WordPress.org

Ready to get started?Download WordPress

Forums

amr users
[resolved] Not properly working on multisite (3 posts)

  1. robaggio
    Member
    Posted 9 months ago #

    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/

  2. anmari
    Member
    Plugin Author

    Posted 9 months ago #

    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\'' ;
    
    		}
    	}
  3. robaggio
    Member
    Posted 9 months ago #

    Now it works.

    Thanks for your great support!

Reply

You must log in to post.

About this Plugin

About this Topic