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
This commit is contained in:
ryan 2009-03-04 20:34:52 +00:00
parent 27a7f46249
commit b37719c1f6
1 changed files with 1 additions and 1 deletions

View File

@ -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();