mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 02:43:32 +03:00
Do not try to check the ldap credentials if the user has no ldap installed on server
This commit is contained in:
parent
88b8f87f97
commit
ea95b20873
1 changed files with 4 additions and 4 deletions
|
@ -50,14 +50,14 @@ class Ldap_client
|
||||||
*/
|
*/
|
||||||
public function check_login(string $username, string $password): ?array
|
public function check_login(string $username, string $password): ?array
|
||||||
{
|
{
|
||||||
|
if (!extension_loaded('ldap')) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($username)) {
|
if (empty($username)) {
|
||||||
throw new InvalidArgumentException('No username value provided.');
|
throw new InvalidArgumentException('No username value provided.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check LDAP environment and configuration
|
|
||||||
|
|
||||||
$this->check_environment();
|
|
||||||
|
|
||||||
$ldap_is_active = setting('ldap_is_active');
|
$ldap_is_active = setting('ldap_is_active');
|
||||||
|
|
||||||
if (!$ldap_is_active) {
|
if (!$ldap_is_active) {
|
||||||
|
|
Loading…
Reference in a new issue