Add some debugging logs when users are created or updated
This commit is contained in:
@@ -192,11 +192,15 @@ function sync(progressCallback, callback) {
|
||||
}
|
||||
|
||||
if (error) {
|
||||
debug('[adding user]', user.uid, user.mail, user.cn);
|
||||
|
||||
users.create(user.uid, null, user.mail, user.cn, { source: 'ldap' }, auditsource.EXTERNAL_LDAP_TASK, function (error) {
|
||||
if (error) console.error('Failed to create user', user, error);
|
||||
callback();
|
||||
});
|
||||
} else if (result.email !== user.mail || result.displayName !== user.cn) {
|
||||
debug('[updating user]', user.uid, user.mail, user.cn);
|
||||
|
||||
users.update(result.id, { email: user.mail, displayName: user.cn }, auditsource.EXTERNAL_LDAP_TASK, function (error) {
|
||||
if (error) console.error('Failed to update user', user, error);
|
||||
callback();
|
||||
|
||||
Reference in New Issue
Block a user