Skip to content

Get list of users filtered by role; results limited to 50? #45

@mrichman

Description

@mrichman

I am trying to get a list of all users where the role is 'subscriber', but the list that comes back seems truncated at 50.

from wordpress_xmlrpc import Client
from wordpress_xmlrpc.methods.users import GetUsers
...
wp = Client(url, username, password)
users = wp.call(GetUsers())
subs = []
for u in users:
    if 'subscriber' in u.roles:
        subs.append((u.email, u.first_name))
return subs

How do I apply the role filter to GetUsers() and how do I get the complete list, not just the first 50 results?

Thanks,
Mark

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions