Better user check.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-13 18:18:07 +00:00
parent 100b550e1a
commit 9a11319958
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ if ( !function_exists('get_currentuserinfo') ) :
function get_currentuserinfo() {
global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity, $current_user;
if ( !isset($_COOKIE[USER_COOKIE])) {
if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) ||
!wp_login($_COOKIE[USER_COOKIE], $_COOKIE[PASS_COOKIE], true) ) {
$current_user = new WP_User(0);
return false;
}