Make multi-domain authn working w/ upper-case domains in user names

refs #3232
This commit is contained in:
Alexander A. Klimov 2018-01-16 10:36:22 +01:00
parent fd489f861c
commit 8c7ccce4a7
2 changed files with 2 additions and 2 deletions

View File

@ -387,7 +387,7 @@ class LdapUserBackend extends LdapRepository implements UserBackendInterface, Do
public function authenticate(User $user, $password)
{
if ($this->domain !== null) {
if (! $user->hasDomain() || strtolower($user->getDomain()) !== $this->domain) {
if (! $user->hasDomain() || strtolower($user->getDomain()) !== strtolower($this->domain)) {
return false;
}

View File

@ -683,7 +683,7 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt
$domain = $this->getDomain();
if ($domain !== null) {
if (! $user->hasDomain() || strtolower($user->getDomain()) !== $domain) {
if (! $user->hasDomain() || strtolower($user->getDomain()) !== strtolower($domain)) {
return array();
}