WordPress.org

Make WordPress Core


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

Introduce WP_User::exists(). see #20372

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/user.php

    r20239 r20378  
    260260        $user = new WP_User( $user );
    261261
    262     if ( ! isset( $user->ID ) )
     262    if ( ! $user->exists() )
    263263        return false;
    264264
     
    941941    $user_level = (int) isset($user->user_level) ? $user->user_level : 0;
    942942
    943     if ( 0 == $user->ID ) {
     943    if ( ! $user->exists() ) {
    944944        $user_login = $user_email = $user_url = $user_pass_md5 = $user_identity = '';
    945945        return;
Note: See TracChangeset for help on using the changeset viewer.