mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Added some LDAP debugging - related to #8670
This commit is contained in:
parent
896ce3456e
commit
fc6a33ad38
|
@ -292,12 +292,19 @@ class LdapAd extends LdapAdConfiguration
|
|||
* if so, check the Active Directory User Account Control Flags
|
||||
*/
|
||||
if ($user->hasAttribute($user->getSchema()->userAccountControl())) {
|
||||
\Log::debug('This is AD - userAccountControl is'. $user->getSchema()->userAccountControl());
|
||||
$activeStatus = (in_array($user->getUserAccountControl(), self::AD_USER_ACCOUNT_CONTROL_FLAGS)) ? 1 : 0;
|
||||
} else {
|
||||
|
||||
\Log::debug('This looks like LDAP');
|
||||
// If there is no activated flag, assume this is handled via the OU and activate the users
|
||||
if (false == $this->ldapSettings['ldap_active_flag']) {
|
||||
\Log::debug('ldap_active_flag is false - no ldap_active_flag is set');
|
||||
$activeStatus = 1;
|
||||
}
|
||||
|
||||
\Log::debug('ldap_active_flag is not false - do nothing? that seems dumb/wrong?');
|
||||
|
||||
}
|
||||
|
||||
return $activeStatus;
|
||||
|
|
Loading…
Reference in a new issue