From b37719c1f64515c64b746b2a5e52800aa05ba403 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 4 Mar 2009 20:34:52 +0000 Subject: [PATCH] Check admin_url() when redirecting to profile. Props drossy. fixes #8493 git-svn-id: http://svn.automattic.com/wordpress/trunk@10705 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-login.php b/wp-login.php index f356a040fc..a61cbeccaf 100644 --- a/wp-login.php +++ b/wp-login.php @@ -435,7 +435,7 @@ default: 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/' ) ) + if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) $redirect_to = admin_url('profile.php'); wp_safe_redirect($redirect_to); exit();