id && !$wp_roles->role_objects[$_POST['new_role']]->has_cap('edit_users')) { $update = 'err_admin_role'; continue; } $user = new WP_User($id); $user->set_role($_POST['new_role']); } header('Location: users.php?update=' . $update); break; case 'dodelete': check_admin_referer(); if ( empty($_POST['users']) ) { header('Location: users.php'); } if ( !current_user_can('edit_users') ) die(__('You can’t delete users.')); $userids = $_POST['users']; $update = 'del'; foreach ($userids as $id) { if($id == $current_user->id) { $update = 'err_admin_del'; continue; } switch($_POST['delete_option']) { case 'delete': wp_delete_user($id); break; case 'reassign': wp_delete_user($id, $_POST['reassign_user']); break; } } header('Location: users.php?update=' . $update); break; case 'delete': check_admin_referer(); if (empty($_POST['users'])) { header('Location: users.php'); } if ( !current_user_can('edit_users') ) $error['edit_users'] = __('You can’t delete users.'); $userids = $_POST['users']; include ('admin-header.php'); ?>

get_col("SELECT ID FROM $wpdb->users;"); foreach($userids as $userid) { $tmp_user = new WP_User($userid); $roles = $tmp_user->roles; $role = $roles[0]; $roleclasses[$role][$tmp_user->user_login] = $tmp_user; } ?>

$roleclass) { ksort($roleclass); ?> user_email; $url = $user_object->user_url; $short_url = str_replace('http://', '', $url); $short_url = str_replace('www.', '', $short_url); if ('/' == substr($short_url, -1)) $short_url = substr($short_url, 0, -1); if (strlen($short_url) > 35) $short_url = substr($short_url, 0, 32).'...'; $style = ('class="alternate"' == $style) ? '' : 'class="alternate"'; $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$user_object->ID' and post_status = 'publish'"); if (0 < $numposts) $numposts = "$numposts"; echo " "; echo ""; echo ''; echo ''; } ?>

role_names[$role]; ?>

 
$email $short_url$numposts'; if (current_user_can('edit_users')) echo "".__('Edit').""; echo '

'; foreach($wp_roles->role_names as $role => $name) { $role_select .= ""; } $role_select .= ''; ?>

Users can register themselves or you can manually create users here.

'), get_settings('siteurl')); ?>