mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-01-05 21:19:16 +00:00
[LDAP] skip sync user if username_field in LDAP is empty
This commit is contained in:
@@ -146,6 +146,11 @@ foreach ($response as $user) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (empty($user[$iam_settings['username_field']][0])){
|
||||
logMsg("warning", "Skipping user " . $user['displayname'][0] . " due to empty LDAP ". $iam_settings['username_field'] . "property.'");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!$row && intval($iam_settings['import_users']) == 1){
|
||||
// mailbox user does not exist, create...
|
||||
logMsg("info", "Creating user " . $user[$iam_settings['username_field']][0]);
|
||||
|
||||
Reference in New Issue
Block a user