fix LDAP issues and allow to migrate from local to LDAP account (#4445)

This commit is contained in:
Kevin Papst
2023-11-17 14:37:00 +01:00
committed by GitHub
parent 2fb9ea9239
commit 92c6922afb
8 changed files with 33 additions and 114 deletions

View File

@@ -62,9 +62,10 @@ final class LdapCredentialsSubscriber implements EventSubscriberInterface
throw new BadCredentialsException('The presented user needs to be a Kimai user.');
}
if (!$user->isLdapUser()) {
return;
}
// removing this code allows to upgrade from local to LDAP users
// if (!$user->isLdapUser()) {
// return;
// }
if (!$this->ldapManager->bind($user->getUserIdentifier(), $presentedPassword)) {
throw new BadCredentialsException('The presented password is invalid.');