do not reset password for LDAP and SAML users or rehash on API calls (#2916)

This commit is contained in:
Kevin Papst
2021-11-10 11:34:50 +01:00
committed by GitHub
parent 73ab26c7b7
commit 21dbfdb4f9
4 changed files with 10 additions and 30 deletions

View File

@@ -28,6 +28,7 @@ final class SamlUserFactory
$user = new User();
$user->setEnabled(true);
$user->setUsername($token->getUsername());
$user->setPassword('');
$this->hydrateUser($user, $token);
@@ -73,8 +74,11 @@ final class SamlUserFactory
}
// fill them after hydrating account, so they can't be overwritten
// by the mapping attributes
if ($user->getId() === null) {
$user->setPassword('');
}
$user->setUsername($token->getUsername());
$user->setPassword('');
$user->setAuth(User::AUTH_SAML);
}