Gestion d'un compte non enregistré
This commit is contained in:
parent
eeeb5c3db8
commit
0ed4582cf0
|
@ -361,12 +361,10 @@ class user extends common {
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'notification' => $notification
|
'notification' => $notification
|
||||||
]);
|
]);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Le compte existe
|
* Le compte existe
|
||||||
*/
|
*/
|
||||||
|
} else {
|
||||||
// Cas 4 : le délai de blocage est dépassé et le compte est au max - Réinitialiser
|
// Cas 4 : le délai de blocage est dépassé et le compte est au max - Réinitialiser
|
||||||
if ($this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) < time()
|
if ($this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) < time()
|
||||||
AND $this->getData(['user',$userId,'connectFail']) === $this->getData(['config', 'connect', 'attempt']) ) {
|
AND $this->getData(['user',$userId,'connectFail']) === $this->getData(['config', 'connect', 'attempt']) ) {
|
||||||
|
@ -396,8 +394,7 @@ class user extends common {
|
||||||
'redirect' => helper::baseUrl(),
|
'redirect' => helper::baseUrl(),
|
||||||
'state' => false
|
'state' => false
|
||||||
]);
|
]);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'notification' => 'Connexion réussie',
|
'notification' => 'Connexion réussie',
|
||||||
|
@ -405,9 +402,8 @@ class user extends common {
|
||||||
'state' => true
|
'state' => true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Sinon notification d'échec
|
// Sinon notification d'échec
|
||||||
else {
|
} else {
|
||||||
$notification = 'Identifiant ou mot de passe incorrect';
|
$notification = 'Identifiant ou mot de passe incorrect';
|
||||||
// Cas 1 le nombre de connexions est inférieur aux tentatives autorisées : incrément compteur d'échec
|
// 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'])) {
|
if ($this->getData(['user',$userId,'connectFail']) < $this->getData(['config', 'connect', 'attempt'])) {
|
||||||
|
@ -436,6 +432,7 @@ class user extends common {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
||||||
|
|
Loading…
Reference in New Issue