Make WordPress Core


Ignore:
Timestamp:
08/04/2011 03:09:27 AM (15 years ago)
Author:
ryan
Message:

Add magic get/set/isset methods to WP_User to avoid data duplication. Standardize on WP_User::ID. Props scribu. see #15458

File:
1 edited

Legend:

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

    r18195 r18504  
    784784        $user = wp_get_current_user();
    785785
    786         if ( $user->id == 0 )
     786        if ( $user->ID == 0 )
    787787                return false;
    788788
    … …  
    13091309function wp_verify_nonce($nonce, $action = -1) {
    13101310        $user = wp_get_current_user();
    1311         $uid = (int) $user->id;
     1311        $uid = (int) $user->ID;
    13121312
    13131313        $i = wp_nonce_tick();
    … …  
    13351335function wp_create_nonce($action = -1) {
    13361336        $user = wp_get_current_user();
    1337         $uid = (int) $user->id;
     1337        $uid = (int) $user->ID;
    13381338
    13391339        $i = wp_nonce_tick();
Note: See TracChangeset for help on using the changeset viewer.