| @@ -1,14 +1,14 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | // Exit if accessed directly |
| 3 | 3 | if( !defined( 'ABSPATH' ) ) exit; |
| 4 | - if( !$wpforo->perm->usergroup_can('vm') ) exit; | |
| 4 | + if( !current_user_can('administrator') ) exit; | |
| 5 | 5 | ?> |
| 6 | 6 | |
| 7 | 7 | <div id="wpf-admin-wrap" class="wrap"> |
| 8 | 8 | <?php wpforo_screen_option() ?> |
| 9 | 9 | <div id="icon-users" class="icon32"><br></div> |
| 10 | - <h2 style="padding:30px 0px 0px 0px;line-height: 20px; margin-bottom:15px;"><?php _e('Members', 'wpforo'); ?></h2> | |
| 10 | + <h2 style="padding:30px 0px 0px 0px;line-height: 20px;"><?php _e('Members', 'wpforo'); ?></h2> | |
| 11 | 11 | <?php $wpforo->notice->show(FALSE) ?> |
| 12 | 12 | <?php if(!isset( $_GET['action'] ) || ( isset( $_GET['action']) && $_GET['action'] == -1 ) ) : ?> |
| 13 | 13 | <?php |
| 14 | 14 | $fields[] = 'display_name'; |
| @@ -14,40 +14,30 @@ | ||
| 14 | 14 | $fields[] = 'display_name'; |
| 15 | 15 | $search_fields[] = 'title'; |
| 16 | 16 | $search_fields[] = 'display_name'; |
| 17 | 17 | $filter_fields = array(); |
| 18 | - if($wpforo->perm->usergroup_can('vmu')){ | |
| 18 | + if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vmu')){ | |
| 19 | 19 | $fields[] = 'user_login'; |
| 20 | 20 | $search_fields[] = 'user_login'; |
| 21 | 21 | } |
| 22 | - if($wpforo->perm->usergroup_can('vmm')){ | |
| 22 | + if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vmm')){ | |
| 23 | 23 | $fields[] = 'user_email'; |
| 24 | 24 | $search_fields[] = 'user_email'; |
| 25 | 25 | } |
| 26 | - if($wpforo->perm->usergroup_can('vmg')){ | |
| 26 | + if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vmg')){ | |
| 27 | 27 | $fields[] = 'groupid'; |
| 28 | 28 | $filter_fields[] = 'groupid'; |
| 29 | 29 | } |
| 30 | - if( $wpforo->perm->usergroup_can('bm') ){ | |
| 31 | - $fields[] = 'status'; | |
| 32 | - $filter_fields[] = 'status'; | |
| 30 | + if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vmr')){ | |
| 31 | + $fields[] = 'rank'; | |
| 33 | 32 | } |
| 34 | - $fields[] = 'last_login'; | |
| 35 | - $fields[] = 'posts'; | |
| 36 | - if($wpforo->perm->usergroup_can('vms')){ | |
| 33 | + if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'vms')){ | |
| 37 | 34 | $search_fields[] = 'signature'; |
| 38 | 35 | } |
| 39 | 36 | $actions = array('button'); |
| 40 | - if( $wpforo->perm->usergroup_can('em') ) $actions = array('edit_user', 'edit_profile'); | |
| 41 | - if( $wpforo->perm->usergroup_can('bm') ){ | |
| 42 | - $actions[] = 'ban'; | |
| 43 | - $bulk_actions[] = 'ban'; | |
| 44 | - $bulk_actions[] = 'unban'; | |
| 45 | - } | |
| 46 | - if( $wpforo->perm->usergroup_can('dm') ){ | |
| 47 | - $actions[] = 'user_delete'; | |
| 48 | - $bulk_actions[] = 'del'; | |
| 49 | - } | |
| 50 | - wpforo_create_form_table('member', 'userid', $fields, $search_fields, $filter_fields, $actions, $bulk_actions); | |
| 37 | + if( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'em') ) $actions = array('edit_user', 'edit_profile'); | |
| 38 | + if( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'dm') ) $actions[] = 'delete'; | |
| 39 | + wpforo_create_form_table('member', 'userid', $fields, $search_fields, $filter_fields, $actions); | |
| 51 | 40 | ?> |
| 52 | 41 | <?php endif; ?> |
| 53 | -</div> | |
| 42 | +</div> | |
| 43 | + | |