Don't allow promoting a user that doesn't already belong to the blog.
git-svn-id: https://develop.svn.wordpress.org/trunk@15150 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e8b955bd48
commit
596e012bbf
@ -74,6 +74,10 @@ case 'promote':
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the user doesn't already belong to the blog, bail.
|
||||
if ( !is_user_member_of_blog( $id ) )
|
||||
wp_die(__('Cheatin’ uh?'));
|
||||
|
||||
$user = new WP_User($id);
|
||||
$user->set_role($_REQUEST['new_role']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user