mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Added some hepful comments
This commit is contained in:
parent
55846cc717
commit
3a0f738fb0
|
@ -162,11 +162,15 @@ class LdapSync extends Command
|
||||||
$item["ldap_location_override"] = isset($results[$i]["ldap_location_override"]) ? $results[$i]["ldap_location_override"]:"";
|
$item["ldap_location_override"] = isset($results[$i]["ldap_location_override"]) ? $results[$i]["ldap_location_override"]:"";
|
||||||
$item["location_id"] = isset($results[$i]["location_id"]) ? $results[$i]["location_id"]:"";
|
$item["location_id"] = isset($results[$i]["location_id"]) ? $results[$i]["location_id"]:"";
|
||||||
|
|
||||||
|
|
||||||
|
// This is active directory, not regular LDAP
|
||||||
if ( array_key_exists('useraccountcontrol', $results[$i]) ) {
|
if ( array_key_exists('useraccountcontrol', $results[$i]) ) {
|
||||||
$enabled_accounts = [
|
$enabled_accounts = [
|
||||||
'512', '544', '66048', '66080', '262656', '262688', '328192', '328224'
|
'512', '544', '66048', '66080', '262656', '262688', '328192', '328224'
|
||||||
];
|
];
|
||||||
$item['activated'] = ( in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts) ) ? 1 : 0;
|
$item['activated'] = ( in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts) ) ? 1 : 0;
|
||||||
|
|
||||||
|
// Fall through to LDAP
|
||||||
} else {
|
} else {
|
||||||
$item['activated'] = 0;
|
$item['activated'] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue