From b383ec36432bbb1d8abc6beec179b612699c29a2 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Thu, 25 Jul 2013 20:49:03 +0300 Subject: [PATCH] simplify --- ipf/auth/models/User.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/ipf/auth/models/User.php b/ipf/auth/models/User.php index 41f35c8..d6af705 100644 --- a/ipf/auth/models/User.php +++ b/ipf/auth/models/User.php @@ -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; } -- 2.49.0