WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Peter's Login Redirect

Redirect users to different locations after logging in and logging out.

Define a set of redirect rules for specific users, users with specific roles, users with specific capabilities, and a blanket rule for all other users. Also, set a redirect URL for post-registration. This is all managed in Settings > Login/logout redirects.

You can use the syntax [variable]username[/variable] in your URLs so that the system will build a dynamic URL upon each login, replacing that text with the user's username. In addition to username, there is "homeurl", "siteurl", "postid-23", "http_referer" and you can also add your own custom URL "variables". See Other Notes / How to Extend for documentation.

If you're using a plugin such as Gigya that bypasses the regular WordPress login redirect process (and only allows one fixed redirect URL), set that plugin to redirect to wp-content/plugins/peters-login-redirect/wplogin_redirect_control.php and set the $rul_use_redirect_controller setting to "true" in the main plugin file.

You can add your own code logic before and between any of the plugin's normal redirect checks if needed. See Other Notes / How to Extend for documentation. Some examples include: redirecting the user based on their IP address; and redirect users to a special page on first login.

This plugin also includes a function rul_register that acts the same as the wp_register function you see in templates (typically producing the Register or Site Admin links in the sidebar), except that it will return the custom defined admin address. rul_register takes three parameters: the "before" code (by default "<li>"), the "after" code (by default "</li>"), and whether to echo or return the result (default is true and thus echo).

Translations

Requires: 3.2 or higher
Compatible up to: 3.9.1
Last Updated: 2014-7-7
Downloads: 320,935

Ratings

4 stars
4.9 out of 5 stars

Support

2 of 8 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,3,3
100,1,1
60,5,3 100,6,6
100,2,2 100,1,1 100,7,7 67,3,2
100,3,3 100,1,1
50,2,1 100,3,3 100,11,11 100,1,1
100,1,1
100,1,1
100,4,4
100,1,1
100,4,4 90,10,9
0,1,0
100,2,2
100,4,4
100,1,1
100,3,3
67,3,2 100,5,5 50,2,1 100,8,8
100,1,1 100,2,2 100,1,1 100,1,1
100,1,1 100,1,1 50,2,1 100,11,11
50,6,3
100,2,2
86,7,6
86,7,6
25,4,1 100,2,2
100,6,6 100,1,1
33,3,1
100,1,1
67,3,2
33,3,1
100,5,5
100,2,2
100,3,3 100,1,1