Fix potential empty result

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/25224/head
Joas Schilling 5 years ago
parent 6c1e294edd
commit 1e35ece8e5
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
  1. 4
      apps/files_external/lib/Listener/StorePasswordListener.php

@ -51,9 +51,9 @@ class StorePasswordListener implements IEventListener {
}
$stored = $this->credentialsManager->retrieve($event->getUser()->getUID(), LoginCredentials::CREDENTIALS_IDENTIFIER);
$update = $stored['password'] !== $event->getPassword();
$update = isset($stored['password']) && $stored['password'] !== $event->getPassword();
if (!$update && $event instanceof UserLoggedInEvent) {
$update = $stored['user'] !== $event->getLoginName();
$update = isset($stored['user']) && $stored['user'] !== $event->getLoginName();
}
if ($stored && $update) {

Loading…
Cancel
Save