forked from ZwiiCMS-Team/ZwiiCMS
RAZ données de blocage
This commit is contained in:
parent
8efafd9683
commit
258ebce4a1
@ -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';
|
||||
|
@ -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 ]);
|
||||
|
Loading…
Reference in New Issue
Block a user