Members Tab * It allows to manage the groups members (users) ****************************************************/ require_once( dirname(__FILE__).'/groups-support.php'); $mode = $_REQUEST['mode']; if($mode == "update"){ $group_temp = ScoperAdminLib::get_group($_REQUEST['id']); UserGroups_tp::write( sprintf( __('%s group membership updated.', 'scoper'), $group_temp->display_name) ); } if($_REQUEST['id'] == "" && ($mode == "edit" || $mode == "update")) UserGroups_tp::write( __('Invalid group.', 'scoper') ); $cancel = $_REQUEST['cancel']; switch($cancel){ case 1: UserGroups_tp::write( __('Group members edit canceled.', 'scoper') ); break; default: break; } ?>
Group Name | \n\t\tMembers | \n\t\t"; echo "\n\t |
---|---|---|
" . $result->display_name . " | ";
if( $members = ScoperAdminLib::get_group_members($result->ID) ) {
printf(_n( '%d user', '%d users', count($members), 'scoper' ), count($members) );
echo ' '; foreach ($members as $member) echo "- ".$member->display_name. " "; } else { if ( $result->meta_id ) _e('(automatic)', 'scoper'); else _e('(no users)', 'scoper'); } echo " | "; if ( ! $result->meta_id ) echo "" . __awp('Edit') . ""; echo " |
" . __('No groups available.', 'scoper') . "
"; } switch($mode){ case "edit": if(isset($_REQUEST['id'])){ $groupID = $_REQUEST['id']; $group = ScoperAdminLib::get_group($groupID); if ( $group->meta_id && ! strpos($group->meta_id, '_ed_') ) die( __('This meta group is automatically populated. You cannot manually add members to it.', 'scoper') ); echo "