Skip to content
Snippets Groups Projects
Commit 14eb5173 authored by kevin.dezaphi's avatar kevin.dezaphi
Browse files

FIX #8337 degraded ldap

parent 15e33fa3
No related branches found
No related tags found
No related merge requests found
...@@ -221,13 +221,11 @@ if (!empty($_SESSION['error'])) { ...@@ -221,13 +221,11 @@ if (!empty($_SESSION['error'])) {
if ($result) { if ($result) {
$_SESSION['error'] = ''; $_SESSION['error'] = '';
\User\models\UserModel::updatePassword(['id' => $result['id'], 'password' => $password]);
\SrcCore\models\AuthenticationModel::resetFailedAuthentication(['userId' => $login]);
$res = $sec->login($login, $password, 'ldap'); $res = $sec->login($login, $password, 'ldap');
$_SESSION['user'] = $res['user']; $_SESSION['user'] = $res['user'];
if ($res['error'] == '') { if ($res['error'] == '') {
if (!empty($standardConnect) && $standardConnect == 'true') {
\User\models\UserModel::updatePassword(['id' => $result['id'], 'password' => $password]);
\SrcCore\models\AuthenticationModel::resetFailedAuthentication(['userId' => $login]);
}
\SrcCore\models\AuthenticationModel::setCookieAuth(['userId' => $login]); \SrcCore\models\AuthenticationModel::setCookieAuth(['userId' => $login]);
} else { } else {
$_SESSION['error'] = $res['error']; $_SESSION['error'] = $res['error'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment