token login: emit preLogin event with LoginName

to bring it in line with normal (non-token) login.

Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
This commit is contained in:
Lionel Elie Mamane 2021-02-19 22:27:46 +01:00
parent 946430862e
commit f99f463834

View file

@ -647,7 +647,7 @@ class Session implements IUserSession, Emitter {
// Ignore and use empty string instead
}
$this->manager->emit('\OC\User', 'preLogin', [$uid, $password]);
$this->manager->emit('\OC\User', 'preLogin', [$dbToken->getLoginName(), $password]);
$user = $this->manager->get($uid);
if (is_null($user)) {