mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSformElement::password: fix multiple sent email in some cases
This commit is contained in:
parent
2d27a7049f
commit
d15fdc5d8e
1 changed files with 49 additions and 48 deletions
|
@ -307,7 +307,8 @@ class LSformElement_password extends LSformElement {
|
|||
}
|
||||
|
||||
public function send($params) {
|
||||
if (is_array($this -> sendMail)) {
|
||||
if (!is_array($this -> sendMail))
|
||||
return true;
|
||||
$mail = (String)$this -> sendMail['mail'];
|
||||
self :: log_debug("send(): mail from params: '$mail'");
|
||||
if (!$mail) {
|
||||
|
@ -356,14 +357,14 @@ class LSformElement_password extends LSformElement {
|
|||
$headers
|
||||
)) {
|
||||
LSsession :: addInfo(_('Notice mail sent.'));
|
||||
// Set $this -> sendMail to false to avoid potential multiple sent email
|
||||
$this -> sendMail = false;
|
||||
}
|
||||
else {
|
||||
LSerror :: addErrorCode('LSformElement_password_02', $mail);
|
||||
return;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function ajax_verifyPassword(&$data) {
|
||||
if (
|
||||
|
|
Loading…
Reference in a new issue