Also fix the username when it changed
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
76367c5c38
commit
831c807eaf
|
@ -52,9 +52,10 @@ class StorePasswordListener implements IEventListener {
|
|||
|
||||
$stored = $this->credentialsManager->retrieve($event->getUser()->getUID(), LoginCredentials::CREDENTIALS_IDENTIFIER);
|
||||
|
||||
if ($stored && $stored['password'] !== $event->getPassword()) {
|
||||
if ($stored && ($stored['user'] !== $event->getUser()->getUID()
|
||||
|| $stored['password'] !== $event->getPassword())) {
|
||||
$credentials = [
|
||||
'user' => $stored['user'],
|
||||
'user' => $event->getUser()->getUID(),
|
||||
'password' => $event->getPassword()
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue