style fixes
This commit is contained in:
+3
-8
@@ -158,13 +158,8 @@ function sync(progressCallback, callback) {
|
||||
|
||||
var ldapUsers = [];
|
||||
|
||||
result.on('searchEntry', function (entry) {
|
||||
ldapUsers.push(entry.object);
|
||||
});
|
||||
|
||||
result.on('error', function (error) {
|
||||
callback(new BoxError(BoxError.EXTERNAL_ERROR, error));
|
||||
});
|
||||
result.on('searchEntry', entry => ldapUsers.push(entry.object));
|
||||
result.on('error', error => callback(new BoxError(BoxError.EXTERNAL_ERROR, error)));
|
||||
|
||||
result.on('end', function (result) {
|
||||
if (result.status !== 0) return callback(new BoxError(BoxError.EXTERNAL_ERROR, 'Server returned status ' + result.status));
|
||||
@@ -175,7 +170,7 @@ function sync(progressCallback, callback) {
|
||||
async.eachSeries(ldapUsers, function (user, iteratorCallback) {
|
||||
const username = user[externalLdapConfig.usernameField];
|
||||
const email = user.mail;
|
||||
const displayName = user.cn;
|
||||
const displayName = user.cn; // user.giveName + ' ' + user.sn
|
||||
|
||||
if (!username || !email || !displayName) {
|
||||
debug(`[empty username/email/displayName] username=${username} email=${email} displayName=${displayName} usernameField=${externalLdapConfig.usernameField}`);
|
||||
|
||||
Reference in New Issue
Block a user