aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-12-17 11:47:17 +0100
committerJoas Schilling <coding@schilljs.com>2021-01-20 08:46:08 +0100
commit831c807eafa7887eb7072513b4413b8c2a8d102b (patch)
tree2543b458bcc861f788962f1c555756bff8418d6a /apps/files_external
parent76367c5c38c59404a6a99ff4b5b489fa4c39373d (diff)
downloadnextcloud-server-831c807eafa7887eb7072513b4413b8c2a8d102b.tar.gz
nextcloud-server-831c807eafa7887eb7072513b4413b8c2a8d102b.zip
Also fix the username when it changed
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Listener/StorePasswordListener.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_external/lib/Listener/StorePasswordListener.php b/apps/files_external/lib/Listener/StorePasswordListener.php
index 3212f2a48c7..f1683af2ecb 100644
--- a/apps/files_external/lib/Listener/StorePasswordListener.php
+++ b/apps/files_external/lib/Listener/StorePasswordListener.php
@@ -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()
];