added registration process
This commit is contained in:
@ -17,9 +17,11 @@ class UserConfirmationService implements ServiceInterface
|
||||
public function run()
|
||||
{
|
||||
$this->model->trigger(UserEvent::EVENT_BEFORE_CONFIRMATION);
|
||||
$result = (bool) $this->model->updateAttributes(['confirmed_at' => time()]);
|
||||
$this->model->trigger(UserEvent::EVENT_AFTER_CONFIRMATION);
|
||||
if ((bool)$this->model->updateAttributes(['confirmed_at' => time()])) {
|
||||
$this->model->trigger(UserEvent::EVENT_AFTER_CONFIRMATION);
|
||||
|
||||
return $result;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user