WordPress.org

Ready to get started?Download WordPress

Forums

Active Directory SSO
Not saving settings (3 posts)

  1. dmpp
    Member
    Posted 7 months ago #

    I tried your plugin on my WP 3.8 on Win Server 2012 with MySQL.

    The settings are not being saved. Whenever I go in to the plugin settings, the fields are blank.

    http://wordpress.org/plugins/active-directory-sso/

    [ Please do not bump, that's not permitted here. ]

  2. verya.ca
    Member
    Posted 5 months ago #

    Same issue for me, and it's kicking me out every time I access a page.

  3. Shonu
    Member
    Posted 5 months ago #

    Yeah, I saw the reason in the code. plugin tries to connect to something that is not configured yet!
    I think I can provide code to get ahead

    in ad-sso-user.php (around line 90)
    After:
    list($ad_sso_local_domain,, $ad_sso_local_userid) = $cred;

    INSERT/UPDATE:

    $ad_sso_fqdn = get_option('ad_sso_fqdn');
    
     if ( is_user_logged_in()) {
         global $current_user;
         get_currentuserinfo();
         $currentUserMatchesRemoteUser = (strtolower(trim($current_user->user_login)) === strtolower(trim($ad_sso_local_userid)));
         $settingsPresent = $ad_sso_fqdn && strlen($ad_sso_fqdn)!=0;
         if ( !$currentUserMatchesRemoteUser && $settingsPresent) {
             #wp_logout();
         }
     }

    END INSERT

    You may also want to update
    @$bind = ldap_bind($connection, $ldapCred, $ad_sso_password);

    to suppress initial connect warnings if needed

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.