Add Exceptions to User::create
This commit is contained in:
parent
af6ca96e66
commit
ac3642e76f
2 changed files with 40 additions and 46 deletions
|
@ -59,10 +59,10 @@ function register_post(App $a)
|
|||
$arr['verified'] = $verified;
|
||||
$arr['language'] = get_browser_language();
|
||||
|
||||
$result = User::create($arr);
|
||||
|
||||
if (!$result['success']) {
|
||||
notice($result['message']);
|
||||
try {
|
||||
$result = User::create($arr);
|
||||
} catch (Exception $e) {
|
||||
notice($e->getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue