added registration process

This commit is contained in:
Antonio Ramirez
2016-12-09 09:36:18 +01:00
parent c3aad1b47d
commit 6457fbe2c2
17 changed files with 208 additions and 123 deletions

View File

@ -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;
}
}