<p>There currently aren't any verification events, but if the user is in a <code>pending</code> state (i.e. they haven't been activated yet), verification will trigger <a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/services/UsersService.php#L837" rel="nofollow">activation</a>, which triggers the <a href="http://buildwithcraft.com/docs/plugins/events-reference#users-onBeforeActivateUser" rel="nofollow">onBeforeActivateUser</a> and <a href="http://buildwithcraft.com/docs/plugins/events-reference#users-onActivateUser" rel="nofollow">onActivateUser</a> events. </p>

CC BY-SA 3.0
2015-10-29T22:26:12.040Z
onActivateUser should be just what I need, thanks!
John O
CC BY-SA 3.0
2015-10-29T21:55:48.227Z
2015-10-29T21:55:48.227Z
Brad Bell
<p>Is there an event or hook we can leverage after a user verifies their email address? It looks like this is handled in <code>UsersController::actionVerifyEmail()</code> which calls <code>$this-&gt;_onAfterActivateUser</code> which calls <code>$this-&gt;_redirectUserAfterAccountActivation</code>. The specific users being created will not have CP access, so they will be redirected to <code>craft()-&gt;config-&gt;getLocalized('activateAccountSuccessPath')</code> in that method. </p>

<p>I would like to be able to set a flash message to confirm the email verification and informing them they need to log in to access all of the site, but I don't see any events or hooks to tie into. Any suggestions?</p>

<plugin-development><users><emails><activation>
Event or hook when user account email validated
# Event or hook when user account email validated

(Asked by: username_0 on 2015-10-29)

Is there an event or hook we can leverage after a user verifies their email address? It looks like this is handled in `UsersController::actionVerifyEmail()` which calls `$this->_onAfterActivateUser` which calls `$this->_redirectUserAfterAccountActivation`. The specific users being created will not have CP access, so they will be redirected to `craft()->config->getLocalized('activateAccountSuccessPath')` in that method.

I would like to be able to set a flash message to confirm the email verification and informing them they need to log in to access all of the site, but I don't see any events or hooks to tie into. Any suggestions?

**Tags:** plugin-development, users, emails, activation

---

## 1 answers

### Answer by username_1 on 2015-10-29. Score: 1 | Accepted answer

There currently aren't any verification events, but if the user is in a `pending` state (i.e. they haven't been activated yet), verification will trigger [activation](https://github.com/pixelandtonic/Craft-Release/blob/master/app/services/UsersService.php#L837), which triggers the [onBeforeActivateUser](http://buildwithcraft.com/docs/plugins/events-reference#users-onBeforeActivateUser) and [onActivateUser](http://buildwithcraft.com/docs/plugins/events-reference#users-onActivateUser) events.

> **Comments:**
> **username_0**: onActivateUser should be just what I need, thanks!  

---

