WordPress.org

Ready to get started?Download WordPress

Forums

Shibboleth
Fix for logging directly into a network site (3 posts)

  1. mrclay
    Member
    Posted 3 years ago #

    When logging in from a network site, shibboleth_session_initiator_url() does not create the right target URL in WP3.0. ($GLOBALS['current_site'] seems to always be the "main" site). The result is that Shibboleth always sends you back to the main site's /wp-login.php instead of, e.g., /subsite/wp-login.php.

    The fix is easy. At line 229 of shibboleth.php (in version 1.4), replace:

    if ( function_exists('switch_to_blog') ) switch_to_blog($GLOBALS['current_site']->blog_id);
    $target = site_url('wp-login.php');
    if ( function_exists('restore_current_blog') ) restore_current_blog();

    With:
    $target = get_home_url(null, 'wp-login.php');

    http://wordpress.org/extend/plugins/shibboleth/

  2. mrclay
    Member
    Posted 3 years ago #


  3. jehanproc
    Member
    Posted 3 years ago #

    hello,

    in my case the probleme is now reversed .
    I use version 1.4 of shib plugin, login with shib works fine on the main site (wp.domain.fr), but if I try to login from a "child" site (child.wp.domain.fr/wp-login.php), the wp-login.php doesn't show the shibboleth login option => only the traditional local username + password fields form shows up .

    I think it's the same remark as posted their with no repsonse:
    http://wordpress.org/support/topic/plugin-shibboleth-multi-domain-compatibility?replies=1

    Any idea of what could be wrong ?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic