ldap: ensure missing ldap user is auto-created
This commit is contained in:
parent
83ec0b5201
commit
538f3d6bd8
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ class LoginController extends AuthController
|
|||
$password = param($request, 'password');
|
||||
$user = $this->database->query('SELECT `id`, `email`, `username`, `password`,`is_admin`, `active`, `current_disk_quota`, `max_disk_quota`, `ldap`, `copy_raw` FROM `users` WHERE `username` = ? OR `email` = ? LIMIT 1', [$username, $username])->fetch();
|
||||
|
||||
if ($this->config['ldap']['enabled'] && ($user->ldap ?? true)) {
|
||||
if ($this->config['ldap']['enabled'] && (!$user || $user->ldap ?? true)) {
|
||||
$user = $this->ldapLogin($request, $username, param($request, 'password'), $user);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue