From c1762498482f7124546f94ae76eab69f565791b0 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 23 May 2011 11:50:34 +0200 Subject: [PATCH] LSformElement::password : Do not send mail if password is not set --- public_html/includes/class/class.LSformElement_password.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public_html/includes/class/class.LSformElement_password.php b/public_html/includes/class/class.LSformElement_password.php index afb947a7..b2543156 100644 --- a/public_html/includes/class/class.LSformElement_password.php +++ b/public_html/includes/class/class.LSformElement_password.php @@ -68,6 +68,12 @@ class LSformElement_password extends LSformElement { } //Mail + + // Do not send mail if password is not set : + if (empty($return[$this -> name])) { + return true; + } + if (isset($_POST['LSformElement_password_'.$this -> name.'_send'])) { if ($_POST['LSformElement_password_'.$this -> name.'_send']==1) { $this -> sendMail = true;