Better user check.
git-svn-id: https://develop.svn.wordpress.org/trunk@3302 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
afd6d33bf2
commit
e7b4d38f78
@ -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
Block a user