mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 18:37:58 +01:00
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:
parent
60e440142e
commit
d917ddc2f5
@ -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