Changeset 31188 for trunk/src/wp-includes/user.php
- Timestamp:
- 01/16/2015 01:05:52 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r31144 r31188 113 113 */ 114 114 function wp_authenticate_username_password($user, $username, $password) { 115 if ( is_a( $user, 'WP_User' )) {115 if ( $user instanceof WP_User ) { 116 116 return $user; 117 117 } … … 168 168 */ 169 169 function wp_authenticate_cookie($user, $username, $password) { 170 if ( is_a( $user, 'WP_User' )) {170 if ( $user instanceof WP_User ) { 171 171 return $user; 172 172 } … … 203 203 */ 204 204 function wp_authenticate_spam_check( $user ) { 205 if ( $user && is_a( $user, 'WP_User' )&& is_multisite() ) {205 if ( $user instanceof WP_User && is_multisite() ) { 206 206 /** 207 207 * Filter whether the user has been marked as a spammer. … … 1711 1711 global $wpdb; 1712 1712 1713 if ( is_a( $userdata, 'stdClass' )) {1713 if ( $userdata instanceof stdClass ) { 1714 1714 $userdata = get_object_vars( $userdata ); 1715 } elseif ( is_a( $userdata, 'WP_User' )) {1715 } elseif ( $userdata instanceof WP_User ) { 1716 1716 $userdata = $userdata->to_array(); 1717 1717 } … … 1970 1970 */ 1971 1971 function wp_update_user($userdata) { 1972 if ( is_a( $userdata, 'stdClass' ) )1972 if ( $userdata instanceof stdClass ) { 1973 1973 $userdata = get_object_vars( $userdata ); 1974 elseif ( is_a( $userdata, 'WP_User' ) )1974 } elseif ( $userdata instanceof WP_User ) { 1975 1975 $userdata = $userdata->to_array(); 1976 } 1976 1977 1977 1978 $ID = (int) $userdata['ID'];
Note: See TracChangeset
for help on using the changeset viewer.