Is there a way to list all user in a specific Group in Role Scoper?
Is there a way to list all user in a specific Group in Role Scoper?
So I created a function but I think something is missing:
<?php function display_userGroups1() {
require_once(SCOPER_ABSPATH . "/admin/admin_lib_rs.php");
$uCriaturas1 = get_group_by_name('Criaturas_level1');
$uCriaturas1_ID = $uCriaturas1->ID;
$in_uCriaturas1 = ScoperAdminLib::get_group_members($uCriaturas1_ID);
echo '<ul class="listC">';
foreach($in_uCriaturas1 as $user){
$criaturaID = $user->ID;
/* $userphoto = userphoto_thumbnail($curauth); */
if (function_exists('userphoto_the_author_thumbnail')) {
echo '<li class="thumbC">';
echo '<div><a href="http://criaturas.magaworks.com/about/' . $criaturaID->user_nicename . '" title="' . sprintf( __( "Ver %s" ), $criaturaID->user_nicename ) . '" ' . '>';
userphoto_thumbnail($criaturaID);
}
echo '</a></div>';
echo '<div class="thumbID">id: <a href="http://criaturas.magaworks.com/about/' . $criaturaID->user_nicename . '" title="' . sprintf( __( "Ver %s" ), $criaturaID->user_nicename ) . '" ' . '>'. $criaturaID->user_nicename .'</a>, ';
echo get_user_meta($criaturaID, 'display_name') . ' is a member of the Criaturas_level1.';
echo '</div></li>';
}
echo '</ul>';
}
?>
I always get this error:
Fatal error: Call to undefined function get_group_by_name() in /home/magawork/public_html/criaturas/wp-content/themes/Infinity/functions.php on line 310
Ok, Forget about it.
I went to my PHPadmin and got the group ID.
But still I would like to know I it didn't work.
I have "assume no front-end admin" option disabled, and I am calling other functions from Role Scoper and have no problem with it. If anyone knows why this happens, please let me know.
change:
$uCriaturas1 = get_group_by_name('Criaturas_level1');
to:
$uCriaturas1 = ScoperAdminLib::get_group_by_name('Criaturas_level1');Thanks :)
This topic has been closed to new replies.