mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Users: Use more appropriate HTTP status codes for errors relating to user management.
Also re-uses one error message string. Props tuanmh Fixes #40230 git-svn-id: https://develop.svn.wordpress.org/trunk@40940 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -59,7 +59,7 @@ function edit_user( $user_id = 0 ) {
|
||||
// If the new role isn't editable by the logged-in user die with error
|
||||
$editable_roles = get_editable_roles();
|
||||
if ( ! empty( $new_role ) && empty( $editable_roles[$new_role] ) )
|
||||
wp_die(__('You can’t give users that role.'));
|
||||
wp_die( __( 'Sorry, you are not allowed to give users that role.' ), 403 );
|
||||
}
|
||||
|
||||
if ( isset( $_POST['email'] ))
|
||||
|
||||
Reference in New Issue
Block a user