Make WordPress Core


Ignore:
Timestamp:
04/06/2012 07:18:45 PM (12 years ago)
Author:
ryan
Message:

Introduce WP_User::exists(). see #20372

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r20287 r20378  
    186186    $user = new WP_User($user_id);
    187187
    188     if ( empty( $user->ID ) ) {
     188    if ( ! $user->exists() ) {
    189189        restore_current_blog();
    190190        return new WP_Error('user_does_not_exist', __('That user does not exist.'));
     
    248248    // wp_revoke_user($user_id);
    249249    $user = new WP_User($user_id);
    250     if ( empty( $user->ID ) ) {
     250    if ( ! $user->exists() ) {
    251251        restore_current_blog();
    252252        return new WP_Error('user_does_not_exist', __('That user does not exist.'));
Note: See TracChangeset for help on using the changeset viewer.