catch exceptions and show them when validating email
This commit is contained in:
parent
dfbb4eaa89
commit
55ebddb5fd
@ -211,16 +211,21 @@ class EmailregisterAction extends Action
|
||||
|
||||
$valid = false;
|
||||
|
||||
try {
|
||||
if (Event::handle('StartValidateUserEmail', array(null, $this->email, &$valid))) {
|
||||
$valid = Validate::email($this->email, common_config('email', 'check_domain'));
|
||||
Event::handle('EndValidateUserEmail', array(null, $this->email, &$valid));
|
||||
}
|
||||
|
||||
if (!$valid) {
|
||||
$this->error = _('Not a valid email address.');
|
||||
$this->showRegistrationForm();
|
||||
return;
|
||||
}
|
||||
} catch (ClientException $e) {
|
||||
$this->error = $e->getMessage();
|
||||
$this->showRegistrationForm();
|
||||
return;
|
||||
}
|
||||
|
||||
$confirm = Confirm_address::getAddress($this->email, self::CONFIRMTYPE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user