简体   繁体   中英

Wordpress XML-RPC, How can I get user role or know if a user is able to publish posts?

I need to check user permissions through XMLRPC to know if is able to publish posts.

I checked several XMLRPC methods without success, the new getUsers from WordPress 3.5 seems ideal but I need to support older versions.

How can I validate the user can publish posts?

Thank you!

If you're using 3.5, it looks like it added a function for this: getUser . You'll want to check in the 'roles' return value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM