diff --git a/app/library/App/Controllers/UserController.php b/app/library/App/Controllers/UserController.php index 5d51532..9a476b3 100755 --- a/app/library/App/Controllers/UserController.php +++ b/app/library/App/Controllers/UserController.php @@ -123,11 +123,12 @@ class UserController extends CrudResourceController $data = $this->getPostedData(); - throw new Exception('777', $data[$email_field]); if (!isset($data[$email_field])) { $message = $validation->validate($data[$email_field]); + + throw new Exception('777', $message); if (count($message)) { throw new Exception(ErrorCodes::DATA_FAILED, 'Unable to create item', [ 'messages' => $message, -- libgit2 0.21.4