mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Better user check.
git-svn-id: https://develop.svn.wordpress.org/trunk@3302 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user