mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 12:14:25 +00:00
Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
Fixes #10551 Props nacin git-svn-id: https://develop.svn.wordpress.org/trunk@30356 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||
|
||||
if ( ! current_user_can( 'list_users' ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
||||
|
||||
$wp_list_table = _get_list_table('WP_Users_List_Table');
|
||||
$pagenum = $wp_list_table->get_pagenum();
|
||||
@@ -128,7 +128,7 @@ case 'promote':
|
||||
|
||||
// If the user doesn't already belong to the blog, bail.
|
||||
if ( is_multisite() && !is_user_member_of_blog( $id ) )
|
||||
wp_die(__('Cheatin’ uh?'));
|
||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
||||
|
||||
$user = get_userdata( $id );
|
||||
$user->set_role($_REQUEST['new_role']);
|
||||
|
||||
Reference in New Issue
Block a user