Better user check.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
100b550e1a
commit
9a11319958
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue