Title: Using SimpleSaml AND WordPress login/registration
Last modified: August 21, 2016

---

# Using SimpleSaml AND WordPress login/registration

 *  [Krista](https://wordpress.org/support/users/lady_minx/)
 * (@lady_minx)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/using-simplesaml-and-wordpress-loginregistration/)
 * I would like to be able to have a “login” button for the simpleSAML users, and
   a login button for our non-network users to use WordPress’ normal login/registration
   capabilities. Is this possible?
 * [http://wordpress.org/plugins/simplesamlphp-authentication/](http://wordpress.org/plugins/simplesamlphp-authentication/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Krista](https://wordpress.org/support/users/lady_minx/)
 * (@lady_minx)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/using-simplesaml-and-wordpress-loginregistration/#post-4314998)
 * Well, this was my solution. It’s not perfect, since it still allows all users
   to do a “forgot password” and change password on their profile, but a saml login
   will reset the password the next time the user logs properly via sso anyway.
 * I created two different login links which I put as buttons on my blogs:
 *     ```
       SSOLogin:  http://mysite.com/wp-login.php?saml=yes&redirect_to=/
       Wordpress Login: https://mysite.com/wp-login.php?redirect_to=%2F
       ```
   
 * Then I modified the plugin:
 *     ```
       if (!empty($_GET['saml']) && $_GET['saml'] == 'yes') {
         add_filter('authenticate', array('SimpleSAMLAuthenticator', 'authenticate'), 10, 2);
         add_action('wp_logout', array('SimpleSAMLAuthenticator', 'logout'));
        add_action('wp_logout',create_function('','wp_redirect(home_url());exit();'));
       } else {
         remove_all_filters('authenticate');
         add_filter('authenticate', 'wp_authenticate_username_password', 10, 3);
       }
       //add_action('lost_password', array('SimpleSAMLAuthenticator', 'disable_function'));
       //add_action('retrieve_password', array('SimpleSAMLAuthenticator', 'disable_function'));
       //add_action('password_reset',array('SimpleSAMLAuthenticator', 'disable_function'));
       //add_filter('show_password_fields', array('SimpleSAMLAuthenticator', 'show_password_fields'));
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Using SimpleSaml AND WordPress login/registration’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simplesamlphp-authentication.svg)
 * [simpleSAMLphp Authentication](https://wordpress.org/plugins/simplesamlphp-authentication/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simplesamlphp-authentication/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simplesamlphp-authentication/)
 * [Active Topics](https://wordpress.org/support/plugin/simplesamlphp-authentication/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simplesamlphp-authentication/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simplesamlphp-authentication/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Krista](https://wordpress.org/support/users/lady_minx/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/using-simplesaml-and-wordpress-loginregistration/#post-4314998)
 * Status: not resolved