Commit 3e5598deaa8307b1cae893aedd5c11ab0f0eeea6
1 parent
a7b286bf
email validation
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
app/library/App/Controllers/UserController.php
... | ... | @@ -124,11 +124,10 @@ class UserController extends CrudResourceController |
124 | 124 | $data = $this->getPostedData(); |
125 | 125 | |
126 | 126 | |
127 | - if (!isset($data[$email_field])) { | |
127 | + if (isset($data[$email_field])) { | |
128 | 128 | |
129 | 129 | $message = $validation->validate($data[$email_field]); |
130 | 130 | |
131 | - throw new Exception('777', $message); | |
132 | 131 | if (count($message)) { |
133 | 132 | throw new Exception(ErrorCodes::DATA_FAILED, 'Unable to create item', [ |
134 | 133 | 'messages' => $message, | ... | ... |