diff --git a/apps/maarch_entreprise/log.php b/apps/maarch_entreprise/log.php index 67d99ab24488f7f075c876380c0f15366767ab17..85ea2ab91595f8fa7a5ccdba8938c96a4437779e 100755 --- a/apps/maarch_entreprise/log.php +++ b/apps/maarch_entreprise/log.php @@ -221,13 +221,11 @@ if (!empty($_SESSION['error'])) { if ($result) { $_SESSION['error'] = ''; + \User\models\UserModel::updatePassword(['id' => $result['id'], 'password' => $password]); + \SrcCore\models\AuthenticationModel::resetFailedAuthentication(['userId' => $login]); $res = $sec->login($login, $password, 'ldap'); $_SESSION['user'] = $res['user']; 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]); } else { $_SESSION['error'] = $res['error'];