forked from ZwiiCMS-Team/ZwiiCampus
invalide message
This commit is contained in:
parent
56a5b35417
commit
9d0b993c9f
@ -1120,21 +1120,22 @@ class user extends common
|
|||||||
// Id unique incorrecte
|
// Id unique incorrecte
|
||||||
or $this->getUrl(3) !== md5(json_encode($this->getData(['user', $this->getUrl(2)])))
|
or $this->getUrl(3) !== md5(json_encode($this->getData(['user', $this->getUrl(2)])))
|
||||||
) {
|
) {
|
||||||
$message[0] = ($this->getData(['user', $this->getUrl(2)]) === null) === true ?'Utilisateur inconnu':'';
|
|
||||||
$message[1] = ($this->getData(['user', $this->getUrl(2), 'forgot']) + 86400 < time()) === true ?'Temps dépassé':'';
|
$message = ($this->getData(['user', $this->getUrl(2), 'forgot']) + 86400 < time()) === true ?'Temps dépassé':'';
|
||||||
$message[2] = ($this->getUrl(3) !== md5(json_encode($this->getData(['user', $this->getUrl(2)])))) === true ?'Id incorrect':'';
|
$message = ($this->getUrl(3) !== md5(json_encode($this->getData(['user', $this->getUrl(2)])))) === true ?'Id incorrect':'';
|
||||||
|
$message = ($this->getData(['user', $this->getUrl(2)]) === null) === true ?'Utilisateur inconnu':'';
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'access' => false,
|
'redirect' => helper::baseUrl(),
|
||||||
'notification' => implode (' | ', $message)
|
'notification' => 'Invalide : '. $message
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Accès autorisé
|
// Accès autorisé
|
||||||
else {
|
else {
|
||||||
// Soumission du formulaire
|
// Soumission du formulaire
|
||||||
if (
|
if (
|
||||||
// Tous les suers peuvent réinitialiser
|
// Tous les users peuvent réinitialiser
|
||||||
// $this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
// $this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||||
$this->isPost()
|
$this->isPost()
|
||||||
) {
|
) {
|
||||||
|
@ -12,7 +12,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3 offset9">
|
<div class="col3">
|
||||||
|
<?php echo template::button('userResetBack', [
|
||||||
|
'href' => helper::baseUrl(),
|
||||||
|
'value' => template::ico('left')
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
|
<div class="col3 offset6">
|
||||||
<?php echo template::submit('userResetSubmit', [
|
<?php echo template::submit('userResetSubmit', [
|
||||||
'value' => 'Valider'
|
'value' => 'Valider'
|
||||||
]); ?>
|
]); ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user