This issue is knowed at:
To fixe it 2 solutions in “/include/wpmu-functions.ph” at line 1930:
1- Replace:
function promote_if_site_admin(&$user) {
if ( !is_site_admin( $user->user_login ) )
return false;
by
function promote_if_site_admin(&$user) {
return false; /* add this line */
if ( !is_site_admin( $user->user_login ) )
return false;
OR
2- In this function replace:
if ( is_array( $user->{$cap_key} ) ) {
$user->{$cap_key} = array_merge( array( 'administrator' => '1' ), $user->{$cap_key} );
} else {
$user->{$cap_key} = array( 'administrator' => '1' );
}
by
if ( is_array( $user->{$cap_key} ) ) {
$user->{$cap_key} = array_merge( array( 'Administrator' => '1' ), $user->{$cap_key} );
} else {
$user->{$cap_key} = array( 'Administrator' => '1' );
}
In other words, a capital A in administrator.
I don’t know what is the best solution and why this issue known in wpmu 2.7 is not fixed in wpmu 2.8.2.
Thanks. I used your first suggestion and it seems to be fixed. I’ll file a bug in trac if there isn’t one already.
I’ve edit “Site Admin/Options” and only “Update Options”.
All works fine with no modification in “wpmu-functions.php” until I “Log Out”. If I log out and log in again the issue is always active.
If I disable wpmuldap plugin all works fine.
Do you use wpmuldap plugin ?
I do use the ldap plugin on one site but I’ve had this problem on two other installs which don’t use ldap.
With phpMyAdmin can you verify the value of “wp_1_capability” in the table “wp-usermeta” for “user_id = 1”.
Is it really set to “a:1:{s:13:”administrator”;b:1;}” ?
That Administrator fix is a bogus fix as the Administrator role doesn’t exist.
you can change the Line36 of unfiltered-mu.php:
change
$wp_roles->role_objects['editor']->add_cap( 'unfiltered_html' );
to
$wp_roles->add_cap('editor', 'unfiltered_html' );
The promote_if_siteadmin() function has been fixed in the latest versions of WordPress MU. There’s no need to modify the plugin.
I don’t recommend using the “fixed” version linked above, see here for further details.