Title: Setting up simpleSAMLphp Authentication plugin
Last modified: August 19, 2016

---

# Setting up simpleSAMLphp Authentication plugin

 *  Resolved [dizzystreak](https://wordpress.org/support/users/dizzystreak/)
 * (@dizzystreak)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/setting-up-simplesamlphp-authentication-plugin/)
 * Hi!
 * I am trying to get the simpleSAMLphp Authentication plugin 0.4.0 working with
   WordPress 3.0.5 (network mode). SimpleSAMLphp is configured do use our LDAP server
   directly.
    There are a few snags I’ve hit. After a default install and brief 
   setup of the plugin, I get this error:
 *     ```
       PHP Warning:  Parameter 1 to SimpleSAMLAuthentication::authenticate() expected to be a reference, value given in /.../wordpress_3.0.5/wp-includes/plugin.php on line 166, referer: http://site.wordpress.FQDN
       ```
   
 * After changing
    `function authenticate(&$username, &$password) {` to `function
   authenticate($username, $password) {`
 * Then, clicking “Log In” takes me to a simpleSAMLphp login, and I get successfully
   authenticated by LDAP and then it fails, because there is no returnTo link offered
   to simpleSAMLphp.
 * Is there anyone, that has successfully made this plugin to work ?
 * Regards.
 * [http://wordpress.org/extend/plugins/simplesamlphp-authentication/](http://wordpress.org/extend/plugins/simplesamlphp-authentication/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [brkt](https://wordpress.org/support/users/brkt/)
 * (@brkt)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/setting-up-simplesamlphp-authentication-plugin/#post-1961028)
 * For this plugin to actually work I had to do the following modifications:
    – 
   $_REQUEST[‘redirect_to’] seems to be empty when plugin tries to set the ReturnTo
   argument for function at line 98. So i changed that line to: `$as->requireAuth(
   array('ReturnTo'=> get_option("siteurl")."/wp-admin")); # $_REQUEST['redirect_to']));`
 * – at this point the login was working for users which already existed in WP db.
   But when the user does not yet exists this plugin tries to manually add the new
   user. The problem is that `$attributes['email']` is empty. So I did a var_dump
   on `$attributes` and found the right email field which is `$attributes['mail'][
   0]`.
 * – add `return new WP_User($wp_uid)` at the end of “// auto-registration is enabled”
   if clause
 * We are using WP 3.0.5 and SimpleSAML 1.6.2
 *  Thread Starter [dizzystreak](https://wordpress.org/support/users/dizzystreak/)
 * (@dizzystreak)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/setting-up-simplesamlphp-authentication-plugin/#post-1961029)
 * Thanks brkt.
    I tried it with WP 3.0.5 and SimpleSAML 1.6.3. It worked, after
   I removed the ampersands from `function authenticate(&$username, &$password) {`
 *  [ben_author](https://wordpress.org/support/users/ben_author/)
 * (@ben_author)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/setting-up-simplesamlphp-authentication-plugin/#post-1961100)
 * whoops, why can’t i delete a post i posted in the wrong spot? heh heh, what’s
   up y’all.
 *  Thread Starter [dizzystreak](https://wordpress.org/support/users/dizzystreak/)
 * (@dizzystreak)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/setting-up-simplesamlphp-authentication-plugin/#post-1961110)
 * 0.5.1 with brkt’s fix seems to resolve our problem.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Setting up simpleSAMLphp Authentication plugin’ 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/)

 * 4 replies
 * 3 participants
 * Last reply from: [dizzystreak](https://wordpress.org/support/users/dizzystreak/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/setting-up-simplesamlphp-authentication-plugin/#post-1961110)
 * Status: resolved