|
From: Smith, D. (Academic) <ds...@fa...> - 2011-09-09 14:08:33
|
Hello:
I posted something to the sourceforge site, but have had no activity there... I presume this list is better trafficked.
Been using wpmu-ldap for awhile now in a WPMU 2.9 install. Recently updated to 3.2.1 and 3.1.1 of the plugin. Authentication works fine, no issues. However, when a site admin uses the "Add User" function to add a LDAP user to their site and that user has never logged in before, as expected the plugin auto-creates their personal blog based on their username (perfect), but it is also adding them as 'Contributor' to blog id 1 (not great).
This behavior is unexpected and not wanted for me at least. I only want their personal blog created and it set as their primary blog. I do not need or want them added to the main blog.
I found a portion of code in wpmu_ldap.functions.php:
/**
* Checks to make sure the user is added to the dashboard blog (if set) or
else blog #1
*/
function wpmuUpdateBlogAccess($userid) {
// reset primary blog to #1 (or dashboard) and add subscriber
role
if ($dashboard = get_site_option( 'dashboard_blog' )) {
add_user_to_blog( $dashboard, $userid, get_site_option(
'default_user_role', 'subscriber' ) );
update_usermeta($userid, "primary_blog", $dashboard);
} else {
add_user_to_blog( '1', $userid, get_site_option(
'default_user_role', 'subscriber' ) );
update_usermeta($userid, "primary_blog", 1);
}
}
I did comment out this entire section of code, which DOES prevent the behavior I described, but it also causes a white screen after adding the user.
Would anyone happen to have any insight into this?
As a side mystery, based on the code above, I don't understand why they were being added as Contributor, when the code clearly shows Subscriber.
Thanks a lot.
Darren
|