diff options
author | Anna <anna@nextcloud.com> | 2022-05-12 20:02:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 20:02:00 +0300 |
commit | 189e91e8cff4b695c8054f4f47f8b09f2b2d0651 (patch) | |
tree | 9be37745fd024298f9b3ab5a20aed7f6ebaaa838 /lib | |
parent | b2e9746469126759623996cfea870376cdb08486 (diff) | |
parent | 8ae7b9ae6740eceb39a40f2efd7e165dd89134a0 (diff) |
Merge pull request #5944 from nextcloud/fix/take-sso-into-consideration-when-provisioning
Consider passwordless signins when provisioning accounts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Http/Middleware/ProvisioningMiddleware.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Http/Middleware/ProvisioningMiddleware.php b/lib/Http/Middleware/ProvisioningMiddleware.php index 3acc1c8d9..8a99b57f8 100644 --- a/lib/Http/Middleware/ProvisioningMiddleware.php +++ b/lib/Http/Middleware/ProvisioningMiddleware.php @@ -70,9 +70,15 @@ class ProvisioningMiddleware extends Middleware { } try { $this->provisioningManager->provisionSingleUser($configs, $user); + $password = $this->credentialStore->getLoginCredentials()->getPassword(); + if ($password === null) { + // Nothing to update, might be passwordless signin + $this->logger->debug('No password set for ' . $user->getUID()); + return; + } $this->provisioningManager->updatePassword( $user, - $this->credentialStore->getLoginCredentials()->getPassword() + $password ); } catch (CredentialsUnavailableException | PasswordUnavailableException $e) { // Nothing to update |