Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I didn’t think NON admins could get to the network sub panel… Are you sure you’re logged in as a subscriber when you get there?

    Thread Starter nehal

    (@nelnehal)

    well in this case the user is logged in as an editor, and the user can see the my sites subpanel with the current site and also another site that he is a subscriber of. The same thing happened for all levels of the site.

    thanks for the quick reply

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    And you’re sure the user is at the wp-admin/network URL? I know a few plugins that can mimic that effect. Also if they’re at their User Dashboard, which is new in 3.1, they may have a site list there.

    Thread Starter nehal

    (@nelnehal)

    wp-admin/my-sites.php is the location of the sites. yes they are in the dashboard, dashboard- then my sites. however shouldn’t only the sites they are admin of show up there?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I suspect that’s been changed in 3.1 then.

    No, it was the same in 3.0 and previous version of mu. It’s plugin disabling time!

    Thread Starter nehal

    (@nelnehal)

    i installed another install of wordpress, still the same issue there. even if the user is a subscriber the sites show up in my sites sections. Removed all plugins, except for the domain mapping, for my old install, still the same issue there as well

    thanks

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Are you SURE you’re looking at THAT MySites and not another one?

    /wp-admin/network/sites.php vs /wp-admin/my-sites.php

    Thread Starter nehal

    (@nelnehal)

    /wp-admin/my-sites.php is the one i am looking at. All site show up that they are a member of show up there, including subscriber etc. ??

    Same issue here.

    I have taken a look at the code and can’t find any filter on these sites. As far as a user has any kind of capabilities on it the site is listed

    The sites are taken from:
    wp-includes/user.php:get_blogs_of_user

    And no filter is applied to them later on… ??

    By the way I solved this issue adding two lines on that function to force get_blogs_of_user to return only administered blog, but i’m not sure if that function has to return all the blogs for wordpress to work correctly or not:

    Index: user.php

    --- user.php	(revisión: 533)
    +++ user.php	(copia de trabajo)
    @@ -688,6 +688,8 @@
     				continue;
     			if ( substr($key, -12, 12) != 'capabilities' )
     				continue;
    +            if ( !isset($value['administrator']))
    +                continue;
     			if ( preg_match( '/^' . $wpdb->base_prefix . '((\d+)_)?capabilities$/', $key, $match ) ) {
     				if ( count( $match ) > 2 )
     					$blogs[] = (int) $match[ 2 ];

    [Please post code snippets between backticks or use the code button.]

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘My sites subpanel shows all the sites’ is closed to new replies.