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

git-svn-id: https://develop.svn.wordpress.org/trunk@18504 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2011-08-04 03:09:27 +00:00
parent 5b4ac17cc5
commit 8eea785bcb
9 changed files with 54 additions and 37 deletions

View File

@@ -783,7 +783,7 @@ if ( !function_exists('is_user_logged_in') ) :
function is_user_logged_in() {
$user = wp_get_current_user();
if ( $user->id == 0 )
if ( $user->ID == 0 )
return false;
return true;
@@ -1308,7 +1308,7 @@ if ( !function_exists('wp_verify_nonce') ) :
*/
function wp_verify_nonce($nonce, $action = -1) {
$user = wp_get_current_user();
$uid = (int) $user->id;
$uid = (int) $user->ID;
$i = wp_nonce_tick();
@@ -1334,7 +1334,7 @@ if ( !function_exists('wp_create_nonce') ) :
*/
function wp_create_nonce($action = -1) {
$user = wp_get_current_user();
$uid = (int) $user->id;
$uid = (int) $user->ID;
$i = wp_nonce_tick();