Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.]

    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… ??

Viewing 2 replies - 1 through 2 (of 2 total)