ID) ) $errors = new WP_Error('head', __('You do not have permission to edit this user.')); switch ($action) { case 'switchposts': check_admin_referer(); /* TODO: Switch all posts from one user to another user */ break; case 'update': check_admin_referer('update-user_' . $user_id); if ( !current_user_can('edit_user', $user_id) ) $errors = new WP_Error('head', __('You do not have permission to edit this user.')); if ( !isset($errors) ) $errors = edit_user($user_id); if( !is_wp_error( $errors ) ) { $redirect = "user-edit.php?user_id=$user_id&updated=true"; $redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect); wp_redirect($redirect); exit; } default: include ('admin-header.php'); $profileuser = new WP_User($user_id); if ( !current_user_can('edit_user', $user_id) ) if ( !is_wp_error( $errors ) ) $errors = new WP_Error('head', __('You do not have permission to edit this user.')); ?>



caps) > count($profileuser->roles)): ?>
caps as $cap => $value) { if(!$wp_roles->is_role($cap)) { if($output != '') $output .= ', '; $output .= $value ? $cap : "Denied: {$cap}"; } } echo $output; ?>