From: SourceForge.net <no...@so...> - 2011-09-06 17:58:13
|
Support Requests item #3404975, was opened at 2011-09-06 10:00 Message generated for change (Comment added) made by spiffywiffy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=959075&aid=3404975&group_id=196841 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: spiffywiffy (spiffywiffy) Assigned to: Nobody/Anonymous (nobody) Summary: New users automatically added as contributor to main blog Initial Comment: Hi: I'm unsure if this is related to the WPMU LDAP plugin I use (3.1.1), but it seems like a possibility. I just upgraded my WPMU install to 3.2.1 Multisite. I have the LDAP plugin set to auto-create accounts and blogs upon successful LDAP login - which it does without problem. However, in my case, new users are also being added as "Contributor" to the main blog (in my case blog id 1). This is unexpected as it was not the case before when I was using WPMU 2.9. Can you let me know if this is related to this plugin or is simply expected behaviour in WP 3.2. Any advice on how to prevent the user being added to the main blog would certainly be appreciated. Thanks! ---------------------------------------------------------------------- >Comment By: spiffywiffy (spiffywiffy) Date: 2011-09-06 13:58 Message: i found this 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); } } However, I'm afraid my PHP skills are not good enough to know if this code is causing this behavior. It seems possible. Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=959075&aid=3404975&group_id=196841 |