Ticket #24992: 24992.2.patch
File 24992.2.patch, 1.9 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/user.php
195 195 * @since 2.0.5 196 196 * 197 197 * @param int $user_id User ID. 198 * @return object WP_User object with user data.198 * @return WP_User|bool WP_User object on success, false on failure. 199 199 */ 200 200 function get_user_to_edit( $user_id ) { 201 201 $user = get_userdata( $user_id ); 202 202 203 $user->filter = 'edit'; 203 if ( $user ) 204 $user->filter = 'edit'; 204 205 205 206 return $user; 206 207 } -
src/wp-includes/pluggable.php
115 115 * @since 0.71 116 116 * 117 117 * @param int $user_id User ID 118 * @return bool|object False on failure, WP_User object on success118 * @return WP_User|bool WP_User object on success, false on failure. 119 119 */ 120 120 function get_userdata( $user_id ) { 121 121 return get_user_by( 'id', $user_id ); … … 130 130 * 131 131 * @param string $field The field to retrieve the user with. id | slug | email | login 132 132 * @param int|string $value A value for $field. A user ID, slug, email address, or login name. 133 * @return bool|object False on failure, WP_User object on success133 * @return WP_User|bool WP_User object on success, false on failure. 134 134 */ 135 135 function get_user_by( $field, $value ) { 136 136 $userdata = WP_User::get_data_by( $field, $value ); … … 463 463 * 464 464 * @param string $username User's username 465 465 * @param string $password User's password 466 * @return WP_ Error|WP_User WP_User object if login successful, otherwise WP_Error object.466 * @return WP_User|WP_Error WP_User object if login successful, otherwise WP_Error object. 467 467 */ 468 468 function wp_authenticate($username, $password) { 469 469 $username = sanitize_user($username);