mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-27 18:32:29 +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
|
||||
{
|
||||
if (!extension_loaded('ldap')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (empty($username)) {
|
||||
throw new InvalidArgumentException('No username value provided.');
|
||||
}
|
||||
|
||||
// Check LDAP environment and configuration
|
||||
|
||||
$this->check_environment();
|
||||
|
||||
$ldap_is_active = setting('ldap_is_active');
|
||||
|
||||
if (!$ldap_is_active) {
|
||||
|
|
Loading…
Reference in a new issue