Using version 1.4 of the Shibboleth plugin we have found that new users are not being added to WordPress correctly. This is because wp_insert_user now requires an email address. It does a search for a matching email address before adding the user. If the email is empty and you already have a user with a blank email address it will always return this user instead of adding the new user.
While it would be nice to never have an empty email address we found it more practical to have the Shibboleth plugin initially create the user account with an email since the plugin updates the user account with that information several lines later.
Code change is:
< $user_id = wp_insert_user(array(‘user_login’=>$user_login));
> $user_id = wp_insert_user(array(‘user_login’=>$user_login,
We are able to do this because our user_login (our eppn) is also a valid email address and is unique. A better fix would be to include the email address in the call to shibboleth_create_new_user or perhaps even fold shibboleth_create_new_user into shibboleth_update_user_data.
- The topic ‘[Plugin: Shibboleth] Unable to add new users correctly’ is closed to new replies.