Make WordPress Core

Changeset 3309


Ignore:
Timestamp:
12/15/2005 04:31:41 PM (20 years ago)
Author:
ryan
Message:

is_user_logged_in()

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/list-manipulation.php

    r3104 r3309  
    55
    66get_currentuserinfo();
    7 if ( !$current_user )
     7if ( !is_user_logged_in() )
    88    die('-1');
    99
  • trunk/wp-includes/classes.php

    r3303 r3309  
    15641564        global $current_user;
    15651565        @header('X-Pingback: '. get_bloginfo('pingback_url'));
    1566         if ( $current_user )
     1566        if ( is_user_logged_in() )
    15671567            nocache_headers();
    15681568        if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) {
  • trunk/wp-includes/pluggable-functions.php

    r3302 r3309  
    150150        }
    151151    }
     152}
     153endif;
     154
     155if ( !function_exists('is_user_logged_in') ) :
     156function is_user_logged_in() {
     157    global $current_user;
     158   
     159    if ( $current_user->id == 0 )
     160        return false;
     161    return true;
    152162}
    153163endif;
Note: See TracChangeset for help on using the changeset viewer.