Changeset 3309

Show
Ignore:
Timestamp:
12/15/05 16:31:41 (3 years ago)
Author:
ryan
Message:

is_user_logged_in()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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;