Redirect after redirection based on role | Peter's Login Redirect | Forum
Back to the login redirect plugin page
3:37 pm
Ok, I get this is crazy edge case, but I'm working on a site with custom user roles, and the request has been made to have each role be redirected to a different place after registration.
The plugin as is works great -- after registration is working fine, the user role redirection is working fine. I just need to combine these for yet another redirect. Can you point me in the *best* way to modify the plugin so that I can could add this ability?
any direction is welcomed, thx
This might not actually be possible with my plugin, because the WordPress registration redirect hook is implemented before the user gets an account, not after. So you cannot look up any role information at that time. Unless this has changed in the latest version of WordPress, you would have to get creative with something like this: set a special redirect URL that is used only upon first registration, then on that page run some custom code that performs the final redirection.