WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Not properly working on multisite

[Resolved] Not properly working on multisite

  • Hi,
    I use your awesome plugin on a multisite environment.
    I enabled the plugin on a sub-site. Now users are shown in the listing who are not user of this particular sub-site.
    All global users are shown on the user listing.

    Is this a bug of your pluign?
    Or how can I achive that only those users (in my case with subscriber role) who belong to the sub-site are listed.

    Thanks
    Robert

    http://wordpress.org/plugins/amr-users/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author anmari

    @anmari

    Indeed!

    Quick Fix till updated version comes.
    in ameta-building.php the
    ‘if is_multisite’ section starting from line 7 till the end of the ‘if’ statement, replace with:

    if (is_multisite() ) {
    		if ( amr_is_network_admin()) {
    		$where = ' INNER JOIN ' . $wpdb->usermeta .
           ' ON      ' . $wpdb->users
    	   . '.ID = ' . $wpdb->usermeta . '.user_id
            WHERE   ' . $wpdb->usermeta .'.meta_key =\'' . $wpdb->prefix . 'capabilities\'' ;
    
    		}
    		else { // is multi site but not network admin - limit the users
    
    					$where = ' INNER JOIN ' . $wpdb->usermeta .
           ' ON      ' . $wpdb->users
    	   . '.ID = ' . $wpdb->usermeta . '.user_id
            WHERE   ' . $wpdb->usermeta .'.meta_key =\'' . $wpdb->prefix . 'capabilities\'' ;
    
    		}
    	}

    Now it works.

    Thanks for your great support!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Not properly working on multisite’ is closed to new replies.