mirror of
git://develop.git.wordpress.org/
synced 2025-02-24 16:43:06 +01:00
Limit what getAuthors exposes. Props josephscott for the patch and xknown for the find. fixes #5534 for 2.4
git-svn-id: https://develop.svn.wordpress.org/trunk@6498 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5709654d4b
commit
4eae78fe70
16
xmlrpc.php
16
xmlrpc.php
@ -527,9 +527,23 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
return($this->error);
|
||||
}
|
||||
|
||||
set_current_user(0, $username);
|
||||
if(!current_user_can("edit_posts")) {
|
||||
return(new IXR_Error(401, __("Sorry, you can not edit posts on this blog.")));
|
||||
}
|
||||
|
||||
do_action('xmlrpc_call', 'wp.getAuthors');
|
||||
|
||||
return(get_users_of_blog());
|
||||
$authors = array();
|
||||
foreach( (array) get_users_of_blog() as $row ) {
|
||||
$authors[] = array(
|
||||
"user_id" => $row->user_id,
|
||||
"user_login" => $row->user_login,
|
||||
"display_name" => $row->display_name
|
||||
);
|
||||
}
|
||||
|
||||
return($authors);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user