Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/users.php.
props ericlewis, kraftbj, lukecarbis, mrmist. fixes #33679. see #14530. Built from https://develop.svn.wordpress.org/trunk@33885 git-svn-id: http://core.svn.wordpress.org/trunk@33854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2411,7 +2411,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
do_action( 'xmlrpc_call', 'wp.getUsers' );
|
||||
|
||||
if ( ! current_user_can( 'list_users' ) )
|
||||
return new IXR_Error( 401, __( 'Sorry, you cannot list users.' ) );
|
||||
return new IXR_Error( 401, __( 'You are not allowed to browse users.' ) );
|
||||
|
||||
$query = array( 'fields' => 'all_with_meta' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user