LSformElement::password : Do not send mail if password is not set
authorBenjamin Renard <brenard@easter-eggs.com>
Mon, 23 May 2011 09:50:34 +0000 (11:50 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Mon, 23 May 2011 09:50:34 +0000 (11:50 +0200)
public_html/includes/class/class.LSformElement_password.php

index afb947a..b254315 100644 (file)
@@ -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;