mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-09 07:23:39 +00:00
Handle the case where sync_LDAP doesn't find any users in LDAP.
This commit is contained in:
parent
0bc51a9e39
commit
256bf9d328
@ -302,6 +302,10 @@ function sync_LDAP(){
|
||||
$mapping = $c->authenticate_hook['config']['mapping_field'];
|
||||
$attributes = array_values($mapping);
|
||||
$ldap_users_tmp = $ldapDriver->getAllUsers($attributes);
|
||||
|
||||
if ( sizeof($ldap_users_tmp) == 0 )
|
||||
return;
|
||||
|
||||
foreach($ldap_users_tmp as $key => $ldap_user){
|
||||
$ldap_users_info[$ldap_user[$mapping["username"]]] = $ldap_user;
|
||||
unset($ldap_users_tmp[$key]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user