New User Activation by email - change activate_redirect
Created 6 years ago by kiltedupAfternoon,
Is there a way to change the redirect after a new user activates their account from email notification they receive?
The code seems to look for a form builder option 'activate_redirect' :
$activator->send($user, $this->builder->getFormOption('activate_redirect', '/'));
But try as I may to use the register form, I can't seem to set this option.
Want to use this in the twig : {{ form('register').redirect(request_get('redirect', '/'))|raw }}
but set this activate_redirect value somewhere!
Anyone done this / have any suggestions?
TIA
Dave
Try adding ...activateRedirect('example/redirect')...
this to your Twig criteria chain there. Methods that are not found automatically set option values using the snake case of the method. You can likely do ...setOption('activate_redirect', 'example/redirect')...
as well cause that method actually exists on the builder. Which - you are not using the builder but a safe wrapper for the builder. So public methods pass through!
Lol you beat me to it! My answer is better 😛
Ill check out the setOption cause that should certainly work!
Try adding
...activateRedirect('example/redirect')...
this to your Twig criteria chain there. Methods that are not found automatically set option values using the snake case of the method. You can likely do...setOption('activate_redirect', 'example/redirect')...
as well cause that method actually exists on the builder. Which - you are not using the builder but a safe wrapper for the builder. So public methods pass through!