Relocate signon to the top. Props AaronCampbell. fixes #7002
git-svn-id: https://develop.svn.wordpress.org/trunk@7958 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
052105a79a
commit
5800542926
@ -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/' ) )
|
||||
|
Loading…
Reference in New Issue
Block a user