Possible fix for #5054 - OpenLDAP (non-AD) LDAP users being deactivated

This commit is contained in:
snipe 2018-08-27 14:51:37 -07:00
parent 0b8d70c7ec
commit 5b8cbe29e1

View file

@ -169,6 +169,11 @@ class LdapSync extends Command
$item['activated'] = ( in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts) ) ? 1 : 0;
} else {
$item['activated'] = 0;
// If there is no activated flag, assume this is handled via the OU and activate the users
if (empty($ldap_result_active_flag)) {
$item['activated'] = 1;
}
}
// User exists