From 880b1b24951e57d91dff32e493065c3a263805d0 Mon Sep 17 00:00:00 2001 From: rboren Date: Sun, 26 Dec 2004 17:45:47 +0000 Subject: [PATCH] Do not get user level for empty user. git-svn-id: http://svn.automattic.com/wordpress/trunk@2004 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-login.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-login.php b/wp-login.php index e127754c0b..afab847fb5 100644 --- a/wp-login.php +++ b/wp-login.php @@ -124,12 +124,12 @@ default: } $redirect_to = 'wp-admin/'; } - - $user = get_userdatabylogin($user_login); - if ( 0 == $user->user_level ) - $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php'; if ($user_login && $user_pass) { + $user = get_userdatabylogin($user_login); + if ( 0 == $user->user_level ) + $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php'; + if ( wp_login($user_login, $user_pass, $using_cookie) ) { if (! $using_cookie) { $user_pass = md5(md5($user_pass)); // Double hash the password in the cookie.