Arrow

Redirect after redirection based on role | Peter's Login Redirect | Forum

Back to the login redirect plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Redirect after redirection based on role
September 24, 2013
3:37 pm
trh
New Member
Forum Posts: 1
Offline

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

September 24, 2013
7:47 pm
Peter
Admin
Forum Posts: 841
Offline

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.