diff --git a/index.js b/index.js index 345c5bb..375cb43 100644 --- a/index.js +++ b/index.js @@ -378,6 +378,10 @@ if (err) { return callback(err); } + // Fix the issue when ldapid is not existed yet + if (!uid) { + return callback(null, {uid:0}); + } user.getUserData(uid, (err, data) => { if (err) { return callback(err);