- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
try {
$newUserId = $users->insert($data);
} catch (Exception $e) {
if ($e->getCode() == '23000') {
$this->customRedirect(
array(
'notice',
'User already exists',
)
);
return;
} else {
throw new Exception(null, null, $e);
}
}