Arrow

If login fails to redirect to a different page | 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
If login fails to redirect to a different page
May 28, 2010
2:36 pm
David J.
Guest

Hi,

Hi,

I'm building a paypal subscriber app to subscribe to a wordpress blog. It creates the registration in the wordpress data tables.

The redirect works great if the user logs in correctly.

However if the user logs incorrectly I'd like the user to be redirected to a custom page
from my app.

Is that possible with this plug-in

Thanks in advance
David J.
Bytes Interactive

May 28, 2010
10:43 pm
Peter
Admin
Forum Posts: 841
Offline

You could actually test for an error in the redirect_wrapper function of my plugin and then redirect the user accordingly.

Code would be something like:

if( isset( $user->errors['incorrect_password'] ) )
{
wp_redirect( './wherever-you-want-to-redirect' );
}
June 1, 2010
6:36 pm
David J.
Guest

Peter,
Thanks. That worked.

Now where do find the list of error messages. For example if the field is blank it goes back to the wordpress login page the password field is empty. I want to completely replace the standard s wordpress login form with mine.

2nd question: I have all subscribers redriected to the blog with your plugin. How do I get the admin user to redirect to the admin web panel with your plugin.

Thank-you
David J.

June 1, 2010
8:47 pm
Peter
Admin
Forum Posts: 841
Offline

You'll have to search wp-login.php and possibly the supporting class and function files to get the complete list of error codes.

User-specific redirect rules take precedence in my plugin, so you can just add one for the admin user.