Check admin_url() when redirecting to profile. Props drossy. fixes #8493
git-svn-id: https://develop.svn.wordpress.org/trunk@10705 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5f5744e143
commit
a2e52bff99
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user