if ( is_user_logged_in() ) { global $current_user; get_currentuserinfo(); $user = get_userdata( $current_user->ID ); }