Use get_dashboard_url() to redirect to the active blog if the user doesn't have access to the current blog. fixes #16297
git-svn-id: https://develop.svn.wordpress.org/trunk@17367 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c4d608db4f
commit
900cee7dc9
@ -588,7 +588,7 @@ default:
|
|||||||
if ( is_multisite() && !get_active_blog_for_user($user->id) )
|
if ( is_multisite() && !get_active_blog_for_user($user->id) )
|
||||||
$redirect_to = user_admin_url();
|
$redirect_to = user_admin_url();
|
||||||
elseif ( is_multisite() && !$user->has_cap('read') )
|
elseif ( is_multisite() && !$user->has_cap('read') )
|
||||||
$redirect_to = user_admin_url();
|
$redirect_to = get_dashboard_url( $user->id );
|
||||||
elseif ( !$user->has_cap('edit_posts') )
|
elseif ( !$user->has_cap('edit_posts') )
|
||||||
$redirect_to = admin_url('profile.php');
|
$redirect_to = admin_url('profile.php');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user