mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Temp fix for blank LDAP values when LDAP is disabled
This commit is contained in:
parent
886b6dd265
commit
8313a069bf
|
@ -81,7 +81,7 @@ class LdapAdConfiguration
|
||||||
return boolval($item);
|
return boolval($item);
|
||||||
}
|
}
|
||||||
// Decrypt the admin password
|
// Decrypt the admin password
|
||||||
if ('ldap_pword' === $key) {
|
if (('ldap_pword' === $key) && ($item!='')) {
|
||||||
try {
|
try {
|
||||||
return decrypt($item);
|
return decrypt($item);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -236,10 +236,13 @@ class LdapAdConfiguration
|
||||||
})->toArray();
|
})->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
$parts = explode('//', $this->ldapSettings['ldap_server']);
|
if ($this->ldapSettings['ldap_server']) {
|
||||||
|
$parts = explode('//', $this->ldapSettings['ldap_server']);
|
||||||
|
return [
|
||||||
|
$parts[1],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [];
|
||||||
$parts[1],
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue