fix login with email

This commit is contained in:
Christoph Wurst 2016-05-09 11:04:18 +02:00 committed by Thomas Müller
parent 69dafd727d
commit 214aa6639c
No known key found for this signature in database
GPG Key ID: A943788A3BBEC44C
1 changed files with 2 additions and 1 deletions

View File

@ -172,7 +172,8 @@ class LoginController extends Controller {
$users = $this->userManager->getByEmail($user);
// we only allow login by email if unique
if (count($users) === 1) {
$loginResult = $this->userManager->checkPassword($users[0]->getUID(), $password);
$user = $users[0]->getUID();
$loginResult = $this->userManager->checkPassword($user, $password);
}
}
if (!$loginResult) {