RAZ données de blocage

This commit is contained in:
fredtempez 2020-12-28 21:08:33 +01:00
parent 8efafd9683
commit 258ebce4a1
2 changed files with 6 additions and 6 deletions

View File

@ -86,6 +86,7 @@ class common {
public static $inputBefore = [];
public static $inputNotices = [];
public static $importNotices = [];
public static $captchaNotices = [];
public static $coreNotices = [];
public $output = [
'access' => true,
@ -2710,10 +2711,6 @@ class layout extends common {
foreach (common::$coreNotices as $item) $notification .= $item . ' | ';
$notificationClass = 'notificationError';
}
if(common::$inputNotices) {
$notification = 'Impossible de soumettre le formulaire, car il contient des erreurs';
$notificationClass = 'notificationError';
}
elseif(empty($_SESSION['ZWII_NOTIFICATION_SUCCESS']) === false) {
$notification = $_SESSION['ZWII_NOTIFICATION_SUCCESS'];
$notificationClass = 'notificationSuccess';

View File

@ -370,7 +370,7 @@ class user extends common {
} else {
// Valeurs en sortie
$this->addOutput([
'notification' => 'Identifiant ou mot de passe incorrect'
'notification' => 'Identifiant ou mot de passe incorrects'
]);
}
/**
@ -391,6 +391,9 @@ class user extends common {
AND password_verify($this->getInput('userLoginPassword', helper::FILTER_STRING_SHORT, true), $this->getData(['user', $userId, 'password']))
AND $this->getData(['user', $userId, 'group']) >= self::GROUP_MEMBER
) {
// RAZ
$this->setData(['user',$userId,'connectFail',0 ]);
$this->setData(['user',$userId,'connectTimeout',0 ]);
// Expiration
$expire = $this->getInput('userLoginLongTime') ? strtotime("+1 year") : 0;
$c = $this->getInput('userLoginLongTime', helper::FILTER_BOOLEAN) === true ? 'true' : 'false';
@ -419,7 +422,7 @@ class user extends common {
}
// Sinon notification d'échec
} else {
$notification = 'Identifiant ou mot de passe incorrect';
$notification = 'Identifiant ou mot de passe incorrects';
// Cas 1 le nombre de connexions est inférieur aux tentatives autorisées : incrément compteur d'échec
if ($this->getData(['user',$userId,'connectFail']) < $this->getData(['config', 'connect', 'attempt'])) {
$this->setData(['user',$userId,'connectFail',$this->getdata(['user',$userId,'connectFail']) + 1 ]);