$errors['user_login'] = __('<strong>ERROR</strong>: The username field is empty.');

343

if ( $http_post && empty( $user_pass ) )

344

$errors['user_pass'] = __('<strong>ERROR</strong>: The password field is empty.');

339

$redirect_to = get_option('siteurl') . '/wp-admin/profile.php';

340

wp_safe_redirect($redirect_to);

341

exit();

342

}

343

344

$errors = $user;

345

// Clear errors if loggedout is set.

346

if ( !empty($_GET['loggedout']) )

347

$errors = new WP_Error();

348

349

// If cookies are disabled we can't log in even with a valid user+pass

350

if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) )

351

$errors->add('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));

345

352

346

353

// Some parts of this script use the main login form to display a message