Forums

[Plugin: Capability Manager] Integrating with User Community (7 posts)

  1. babalu_52
    Member
    Posted 3 years ago #

    Am using several of your plugs, enjoy them all, but I have run across a "bug". If I create a new role in Capability Manager, for example, "Moderator", the Moderator functions as advertised, but that individual no longer displays in the User Community listings. They show up in the standard WP user listings, but not in the User Community. I have created various new Roles as tests, and whenever I check in the User Community listing those members assigned new roles are gone. :(

    Have you or anyone else noticed this? I would like to keep using both plugs but at the moment they don't seem to play well together.

    http://wordpress.org/extend/plugins/capsman/

  2. Txanny
    Member
    Posted 3 years ago #

  3. tjmapes
    Member
    Posted 3 years ago #

    Is there a way I can list all the users from a new role I've made?

    I just want to output a list on a page called "Artists"

  4. Txanny
    Member
    Posted 2 years ago #

    Yes, if you created a new role, you have to go to Community profiles settings and mark it to show.

  5. tjmapes
    Member
    Posted 2 years ago #

    Thanks for your response Txanny...

    So.. on top of having the regular subscriber role listings of all the comunity members, I could have a separate page with only the people marked as "Artist" and list all of them and their avatars etc?

    Is that possible with your solution above?

    Thanks so much! Amazing plugin and something WP really lacks

  6. Txanny
    Member
    Posted 2 years ago #

    No, by now you have only one page for all users. You cannot have different pages by roles. This will be considered to be included in a future release.

  7. tjmapes
    Member
    Posted 2 years ago #

    Actually Txanny, I achieved this very thing. All I did was make a role called "ARTIST", so this might help you for coding that out:

    Check it out over at http://riptapparel.com/community http://riptapparel.com/artists

    <?php $roles = array('artist');
    
    		/* Loop through users to search for the admin and editor users. */
    		foreach( $roles as $role )
    		{
    		  	// all users with artist role
    			if($role == 'artist')
    		  	{
    
    			  	$this_role = "'[[:<:]]".$role."[[:>:]]'";
    			  	$query = "SELECT * FROM $wpdb->users WHERE ID = ANY (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'wp_capabilities' AND meta_value RLIKE $this_role) ORDER BY user_nicename ASC LIMIT 10000";
    			  	$users_of_this_role = $wpdb->get_results($query);
    			  	if ($users_of_this_role)
    				{
    			    	foreach($users_of_this_role as $user)
    					{
    
    						$curuser = get_userdata($user->ID);
    				      	$author_post_url=get_author_posts_url($curuser->ID, $curuser->nicename);
    
    						echo "<ul class='userList'>";
    							echo "<li>";
    								echo "<a href='/community/user/$curuser->nickname' title='.$curuser->display_name'>";
    									echo get_avatar($curuser->user_email, '50', $avatar);
    								echo '</a>';
    
    								echo "<a href='/community/user/$curuser->nickname' title='.$curuser->display_name'>";
    									echo "<p>$curuser->display_name</p>";
    								echo '</a>';
    
    								//echo '<p>'.$curuser->description.'</p>';
    
    						echo '</li>';
    						echo '</ul>';
    				    }
    			  	}
    			}
    
    		}
    		?>

Topic Closed

This topic has been closed to new replies.

About this Topic