mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -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 so, check the Active Directory User Account Control Flags
|
||||||
*/
|
*/
|
||||||
if ($user->hasAttribute($user->getSchema()->userAccountControl())) {
|
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;
|
$activeStatus = (in_array($user->getUserAccountControl(), self::AD_USER_ACCOUNT_CONTROL_FLAGS)) ? 1 : 0;
|
||||||
} else {
|
} 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 there is no activated flag, assume this is handled via the OU and activate the users
|
||||||
if (false == $this->ldapSettings['ldap_active_flag']) {
|
if (false == $this->ldapSettings['ldap_active_flag']) {
|
||||||
|
\Log::debug('ldap_active_flag is false - no ldap_active_flag is set');
|
||||||
$activeStatus = 1;
|
$activeStatus = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\Log::debug('ldap_active_flag is not false - do nothing? that seems dumb/wrong?');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $activeStatus;
|
return $activeStatus;
|
||||||
|
|
Loading…
Reference in a new issue