作为一个插件,我能给你的就是这个。
<?php
/*
Plugin Name: Users Table
Plugin URI: http://www.exe.ie
Description: A list of all available users with their ID, Name, Registration Date, Nickname, User Level and User Role
Version: 1.0
Author: Daniel Conde
Author URI: http://www.exe.ie
License: GPL
*/
add_action(\'admin_menu\', \'my_user_table_menu\');
function my_user_table_menu() {
add_menu_page(\'Users Table\', \'Users Table\', \'0\', \'users_table\', \'users_table\');
}
function users_table() {
global $wpdb; ?>
<div>
<h3>Users Table</h3>
<table class="wp-list-table widefat fixed users">
<thead>
<tr>
<th><b>User ID</b></th>
<th><b>Name</b></th>
<th><b>Registered</b></th>
<th><b>Nickname</b></th>
<th><b>User Level</b></th>
<th><b>User Role</b></th>
</tr>
</thead>
<tbody id="the-list" class="list:user"><?php
$wp_user_search = $wpdb->get_results("SELECT ID, display_name FROM $wpdb->users ORDER BY ID");
foreach ( $wp_user_search as $userid ) {
$user_id = (int) $userid->ID;
$user_info = get_userdata($user_id);
$formid = $user_info->formid;
$user = new WP_User( $user_id );
echo \'<tr id="user-\'.$user_id.\'" class="alternate">\';
echo \'<th>\' . $user_id . \'</th>\';
echo \'<th>\' . $user_info->display_name . \'</th>\';
echo \'<th>\' . $user_info->user_registered . \'</th>\';
echo \'<th>\' . $user_info->nickname . \'</th>\';
echo \'<th>\' . $user_info->user_level . \'</th>\';
echo \'<th>\'; if ( !empty( $user->roles ) && is_array( $user->roles ) ) { foreach ( $user->roles as $role ) echo $role; } echo \'</th>\';
echo \'</tr>\';
} ?>
</tbody>
<tfoot>
<tr>
<th><b>User ID</b></th>
<th><b>Name</b></th>
<th><b>Registered</b></th>
<th><b>Nickname</b></th>
<th><b>User Level</b></th>
<th><b>User Role</b></th>
</tr>
</tfoot>
</table>
</div><?php
} ?>
虽然不是美女,但它确实起到了作用。
复制并另存为用户表。php,上载到插件文件夹并激活