Relocate signon to the top. Props AaronCampbell. fixes #7002

git-svn-id: http://svn.automattic.com/wordpress/trunk@7958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-20 16:40:49 +00:00
parent 60e440142e
commit d917ddc2f5
1 changed files with 2 additions and 2 deletions

View File

@ -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/' ) )