LSformElement_password : Added check of the new password to verify if it's different...
authorBenjamin Renard <brenard@aconit.easter-eggs.fr>
Mon, 26 Apr 2010 14:51:46 +0000 (16:51 +0200)
committerBenjamin Renard <brenard@aconit.easter-eggs.fr>
Mon, 26 Apr 2010 14:52:43 +0000 (16:52 +0200)
public_html/includes/class/class.LSformElement_password.php

index 04f6217..dce28f9 100644 (file)
@@ -60,6 +60,13 @@ class LSformElement_password extends LSformElement {
         return true;
       }
       
+      if ($this -> verifyPassword($return[$this -> name][0])) {
+        LSdebug("Password : no change");
+        unset($return[$this -> name]);
+        $this -> form -> _notUpdate[$this -> name] == true;
+        return true;
+      }      
+      
       //Mail
       if (isset($_POST['LSformElement_password_'.$this -> name.'_send'])) {
         if ($_POST['LSformElement_password_'.$this -> name.'_send']==1) {