mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
Fix exception when the password of a valid ldap user is invalid
This commit is contained in:
parent
8e645d0410
commit
0b28bd31e5
@ -159,15 +159,12 @@ class LdapUserBackend implements UserBackend
|
|||||||
*/
|
*/
|
||||||
public function authenticate(Credential $credentials)
|
public function authenticate(Credential $credentials)
|
||||||
{
|
{
|
||||||
if (!$this->connection->testCredentials(
|
if ($this->connection->testCredentials(
|
||||||
$this->connection->fetchDN($this->selectUsername($credentials->getUsername())),
|
$this->connection->fetchDN($this->selectUsername($credentials->getUsername())),
|
||||||
$credentials->getPassword()
|
$credentials->getPassword()
|
||||||
)) {
|
)) {
|
||||||
return false;
|
return new User($credentials->getUsername());
|
||||||
}
|
}
|
||||||
$user = new User($credentials->getUsername());
|
|
||||||
|
|
||||||
return $user;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user