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