]> git.andy128k.dev Git - ipf.git/commitdiff
simplify
authorAndrey Kutejko <andy128k@gmail.com>
Thu, 25 Jul 2013 17:49:03 +0000 (20:49 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Thu, 25 Jul 2013 17:49:03 +0000 (20:49 +0300)
ipf/auth/models/User.php

index 41f35c8b72b8862919a670bd3ec839457e02c8db..d6af705118a3caee30846c48cfc8450d40177b41 100644 (file)
@@ -217,20 +217,7 @@ class User extends BaseUser
         else
             $user->setUnusablePassword();
 
-        try {
-            $user->save();
-        } catch(IPF_ORM_Exception_Validator $e) {
-            //print_r($e);
-            // Note: you could also use $e->getInvalidRecords(). The direct way
-            // used here is just more simple when you know the records you're dealing with.
-            $userErrors = $user->getErrorStack();
-            //$emailErrors = $user->email->getErrorStack();
-            // Inspect user errors
-            foreach($userErrors as $fieldName => $errorCodes) {
-                echo "Error:".$fieldName;
-                //print_r($errorCodes);
-            }
-        }
+        $user->save();
         return $user;
     }