X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/cc7b1505cd9fafd87c3672f669e13e98b0c544f7..refs/tags/wordpress-2.9:/wp-admin/user-edit.php?ds=sidebyside diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index ac6d4d6e..b3ecb63a 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -1,24 +1,63 @@ ID; + } else { + wp_die(__('Invalid user ID.')); } +} elseif ( !get_userdata($user_id) ) { + wp_die( __('Invalid user ID.') ); +} + +$all_post_caps = array('posts', 'pages'); +$user_can_edit = false; +foreach ( $all_post_caps as $post_cap ) + $user_can_edit |= current_user_can("edit_$post_cap"); + +/** + * Optional SSL preference that can be turned on by hooking to the 'personal_options' action. + * + * @since 2.7.0 + * + * @param object $user User data object + */ +function use_ssl_preference($user) { +?> + + + + +

+ +

+
- +
-
-

+
+ +

-
+ + + +

-
- -

+

-

+

-

+ + + + + -

+ + + + + + + + + + + + + + + + + + + + + + + + +
- - - -first_name ) ) : ?> - - -last_name ) ) : ?> - - -first_name ) && !empty( $profileuser->last_name ) ) : ?> - - - -

- +// print the full list of roles with the primary one selected. +wp_dropdown_roles($user_role); -
- +// print the 'no role' option. Make it selected if the user has no role yet. +if ( $user_role ) + echo ''; +else + echo ''; +?> +
+ +
-

+

-

+ + + + + -

+ + + + -

+ $desc) { +?> + + + + + +
-

-

-
-
-
- -

-

-
+

+ + + + + + -
- -

-

-

-
+ + + + +

+

+
+
+

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

- - -

+ + +