Do not get user level for empty user.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d781edcc70
commit
880b1b2495
|
@ -125,11 +125,11 @@ default:
|
||||||
$redirect_to = 'wp-admin/';
|
$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) {
|
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 ( wp_login($user_login, $user_pass, $using_cookie) ) {
|
||||||
if (! $using_cookie) {
|
if (! $using_cookie) {
|
||||||
$user_pass = md5(md5($user_pass)); // Double hash the password in the cookie.
|
$user_pass = md5(md5($user_pass)); // Double hash the password in the cookie.
|
||||||
|
|
Loading…
Reference in New Issue