Answers.Body: <p>The only way I found to accomplish this was with a custom controller that essentially overrode <code>actionVerifyEmail</code> and <code>_processTokenRequest</code> from <code>UsersController</code>. (With a hook into <code>email.onBeforeSendEmail</code> to rewrite the verification <code>{{link}}</code> to use the custom controller action). It's fragile, but it works.</p>
  
  <p>I've created a feature request to smooth out this experience:
  <a href="https://github.com/craftcms/cms/issues/1228" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/1228</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-13T20:13:12.653Z
Answers.LastActivityDate: 2018-03-28T23:37:28.467Z
Answers.LastEditDate: 2018-03-28T23:37:28.467Z
Answers.UserDisplayName: Mike
Body: <p>I'm working on a profile management form for a site with public registration enabled. I'd like users to be able to change their email address. I've got it working as Craft intended -- they enter their email + current password, a "Verify new email address" email is triggered, and following the verification link updates their email.</p>
  
  <p>The UX wall I'm hitting is that a) the user is logged out when click the verification link and b) they get no messaging around whether or not the email was actually changed.</p>
  
  <p>I've reviewed the <a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/controllers/UsersController.php#L409-L433" rel="nofollow noreferrer">code</a> and don't see any way to improve this experience. I found <a href="https://github.com/craftcms/cms/issues/1421" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/1421</a> but the workaround in there seems heavy handed.</p>
  
  <p>Has anyone come up with an elegant solution for this?</p>
  
Tags: <emails><frontend><user-profile><verification>
Title: UX issue with new email verification link
ThreadText: # UX issue with new email verification link
  
  (Asked by: username_0 on 2016-12-02)
  
  I'm working on a profile management form for a site with public registration enabled. I'd like users to be able to change their email address. I've got it working as Craft intended -- they enter their email + current password, a "Verify new email address" email is triggered, and following the verification link updates their email.
  
  The UX wall I'm hitting is that a) the user is logged out when click the verification link and b) they get no messaging around whether or not the email was actually changed.
  
  I've reviewed the [code](https://github.com/pixelandtonic/Craft-Release/blob/master/app/controllers/UsersController.php#L409-L433) and don't see any way to improve this experience. I found <https://github.com/craftcms/cms/issues/1421> but the workaround in there seems heavy handed.
  
  Has anyone come up with an elegant solution for this?
  
  **Tags:** emails, frontend, user-profile, verification
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-12-13. Score: 1 | Accepted answer
  
  The only way I found to accomplish this was with a custom controller that essentially overrode `actionVerifyEmail` and `_processTokenRequest` from `UsersController`. (With a hook into `email.onBeforeSendEmail` to rewrite the verification `{{link}}` to use the custom controller action). It's fragile, but it works.
  
  I've created a feature request to smooth out this experience:
  <https://github.com/craftcms/cms/issues/1228>
  
  
  ---
  
  