[9.1.06] envoi du mail si mot de passe erroné

This commit is contained in:
fredtempez 2019-05-25 18:38:25 +02:00
parent 0bfedbc983
commit e349924b27
1 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ class user extends common {
]);
// Envoi le mail
$sent = true;
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN)) {
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $mail === true) {
$sent = $this->sendMail(
$userMail,
'Compte créé sur ' . $this->getData(['config', 'title']),
@ -75,8 +75,8 @@ class user extends common {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'user',
'notification' => (($sent === true) && ($mail === true) ? 'Utilisateur créé' : $sent),
'state' => (($sent === true) && ($mail === true) ? true : null)
'notification' => $sent === true ? 'Utilisateur créé' : $sent,
'state' => $sent === true ? true : null
]);
}
// Valeurs en sortie