users_who_can('', COLS_ID_NAME_RS); $agent_list_prefix[ROLE_BASIS_USER] = ''; } if ( GROUP_ROLES_RS && ( $is_administrator ) ) { if ( $agents[ROLE_BASIS_GROUPS] = ScoperAdminLib::get_all_groups(UNFILTERED_RS) ) { $role_bases []= ROLE_BASIS_GROUPS; $agent_list_prefix[ROLE_BASIS_GROUPS] = __('Groups') . ': '; } } if ( empty($role_bases) ) wp_die(__awp('Cheatin’ uh?')); $duration_limits_enabled = scoper_get_option('role_duration_limits'); $content_date_limits_enabled = scoper_get_option('role_content_date_limits'); $agent_names = array(); foreach ( $role_bases as $role_basis ) foreach( $agents[$role_basis] as $agent ) $agent_names[$role_basis][$agent->ID] = str_replace(' ', ' ', $agent->display_name); if ( count($role_bases) > 1 ) { $agent_caption = __('User / Group', 'scoper'); $agent_caption_plural = __('Users or Groups', 'scoper'); } elseif ( isset($agents[ROLE_BASIS_USER]) ) { $agent_caption = __('User', 'scoper'); $agent_caption_plural = __awp('Users'); } elseif ( isset($agents[ROLE_BASIS_GROUPS]) ) { $agent_caption = __('Group', 'scoper'); $agent_caption_plural = __('Groups', 'scoper'); } echo ''; $err = 0; $role_codes = array(); //generate temporary numeric id for each defined role, to reduce html bulk $i = 0; $role_defs = array(); $date_key = ''; // temp foreach( $scoper->role_defs->get_matching('rs') as $role_handle => $role_def) { // user can only view/assign roles they have // instead of hiding unowned roles, just make them uneditable //if ( $is_administrator || ! array_diff(array_keys($scoper->role_defs->role_caps[$role_handle]), $current_rs_user->allcaps) ) { $role_defs[$role_handle] = $role_def; $role_codes[$role_handle] = $i; $i++; //} } if ( isset($_POST['rs_submit']) ) : ?>