WordPress.org

Ready to get started?Download WordPress

Forums

SAML 2.0 Single Sign-On
[resolved] Login Success Redirect? (3 posts)

  1. ilana.mullin
    Member
    Posted 8 months ago #

    Is there a setting for where the plugin will redirect the user once they are successfully logged in? Currently, when a login is successful, the user is directed to /wp-admin, but i would like all users to be directed to the site root instead. I've tried going the route of adding in a redirect in my theme's functions.php, and it works like a charm when i have SAML deactivated, but once i activate SAML, no dice.

    Thanks.

    http://wordpress.org/plugins/saml-20-single-sign-on/

  2. markphipps
    Member
    Posted 7 months ago #

    Edit lib/classes/saml-client.php and change approximately line 160 from:

    wp_redirect(get_admin_url());

    to

    wp_redirect(get_home_url());

  3. ktbartholomew
    Member
    Plugin Author

    Posted 5 months ago #

    0.9.2 has been released, and respects the "redirect_to" parameter of the wp-login.php file. This means you can redirect your users wherever you want, such as sending them directly to the protected post they were just trying to view, or something similar.

    Just create a login URL like http://example.com/wp-login.php?redirect_to=some-url-encoded-location. The default behavior is still to redirect to the admin URL, so Mark's one-liner is still necessary if you'd rather people go back to the home page and can't implement the redirect_to solution above.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.