mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 00:09:06 +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) {
|
public function send($params) {
|
||||||
if (is_array($this -> sendMail)) {
|
if (!is_array($this -> sendMail))
|
||||||
|
return true;
|
||||||
$mail = (String)$this -> sendMail['mail'];
|
$mail = (String)$this -> sendMail['mail'];
|
||||||
self :: log_debug("send(): mail from params: '$mail'");
|
self :: log_debug("send(): mail from params: '$mail'");
|
||||||
if (!$mail) {
|
if (!$mail) {
|
||||||
|
@ -356,14 +357,14 @@ class LSformElement_password extends LSformElement {
|
||||||
$headers
|
$headers
|
||||||
)) {
|
)) {
|
||||||
LSsession :: addInfo(_('Notice mail sent.'));
|
LSsession :: addInfo(_('Notice mail sent.'));
|
||||||
|
// Set $this -> sendMail to false to avoid potential multiple sent email
|
||||||
|
$this -> sendMail = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LSerror :: addErrorCode('LSformElement_password_02', $mail);
|
LSerror :: addErrorCode('LSformElement_password_02', $mail);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function ajax_verifyPassword(&$data) {
|
public static function ajax_verifyPassword(&$data) {
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in a new issue