rebase on oct-10-2023
This commit is contained in:
@@ -683,8 +683,10 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
||||
|
||||
$request_params = array_keys( $request->get_params() );
|
||||
sort( $request_params );
|
||||
// If only 'id' and 'roles' are specified (we are only trying to
|
||||
// edit roles), then only the 'promote_user' cap is required.
|
||||
/*
|
||||
* If only 'id' and 'roles' are specified (we are only trying to
|
||||
* edit roles), then only the 'promote_user' cap is required.
|
||||
*/
|
||||
if ( array( 'id', 'roles' ) === $request_params ) {
|
||||
return true;
|
||||
}
|
||||
@@ -1305,7 +1307,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
if ( false !== strpos( $password, '\\' ) ) {
|
||||
if ( str_contains( $password, '\\' ) ) {
|
||||
return new WP_Error(
|
||||
'rest_user_invalid_password',
|
||||
sprintf(
|
||||
|
||||
Reference in New Issue
Block a user