From d917ddc2f52db781694f60f6a0eafb8b6b27b6e5 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 20 May 2008 16:40:49 +0000 Subject: [PATCH] Relocate signon to the top. Props AaronCampbell. fixes #7002 git-svn-id: http://svn.automattic.com/wordpress/trunk@7958 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-login.php b/wp-login.php index e615f0a41..b3d1f0bfb 100644 --- a/wp-login.php +++ b/wp-login.php @@ -341,13 +341,13 @@ break; case 'login' : default: + $user = wp_signon(); + if ( isset( $_REQUEST['redirect_to'] ) ) $redirect_to = $_REQUEST['redirect_to']; else $redirect_to = 'wp-admin/'; - $user = wp_signon(); - if ( !is_wp_error($user) ) { // If the user can't edit posts, send them to their profile. if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )