I have a front-end form to update user's email address, like this example:
<form method="post" accept-charset="UTF-8" enctype="multipart/form-data">
{{ csrfInput() }}
<input type="hidden" name="action" value="users/save-user">
<input type="hidden" name="userId" value="{{ currentUser.id }}">
<label for="newEmail">New email address</label>
<input type="email" name="email" value="" id="newEmail">
<label for="password">Password</label>
<input type="password" name="password">
<input type="submit">
</form>
Once the form is submitted, Craft send a system message to the user email address, with a confirmation link. Once this link is clicked, the user is redirected to the root URL of the front-end website.
I changed the activateAccountSuccessPath
, but whereas it works during account activation, it doesn't works during account email update.
Example:
'activateAccountSuccessPath' => array(
'en' => 'my-account',
'fr' => 'mon-compte'
)
Or:
'activateAccountSuccessPath' => 'my-account'
I also tried to enable / disable the autoLoginAfterAccountActivation
setting, but the redirection is still not working. Even is user is already logged in, or if he is logged out.
I also checked the Craft logs, but I there's no error, no missing template, etc. ... nothing.
How can I set a custom URI on this link?