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

@@ -75,9 +75,11 @@ class LdapUserHydrator
}
// fill them after hydrating account, so they can't be overwritten
$user->setPassword('');
// by the mapping attributes
if ($user->getId() === null) {
$user->setPassword('');
}
$user->setAuth(User::AUTH_LDAP);
$user->setPreferenceValue('ldap.dn', $ldapEntry['dn']);
}