You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"roles", which listed in the documents as a default field is not being returned. It is returned when running wp user list but if multisite only users from the primary site are returned.
Please advise if there is an existing method to obtain all network users by role.
The text was updated successfully, but these errors were encountered:
Please advise if there is an existing method to obtain all network users by role.
There is not, because users can have different roles on different sites. We'll include some mention in the documentation to this effect.
To generate a list of all users with a given role, you'd need to list users for each site (see reference doc) and concatenate the list you've generated.
@BhargavBhandari90 I think the example will need to be a bit more involved to conclusively document this:
To generate a list of all users with a given role, you'd need to list users for each site (see reference doc) and concatenate the list you've generated.
When running
wp user list --network
, the following fields are returned by default:ID,user_login,display_name,user_email,user_registered
"roles", which listed in the documents as a default field is not being returned. It is returned when running
wp user list
but if multisite only users from the primary site are returned.Please advise if there is an existing method to obtain all network users by role.
The text was updated successfully, but these errors were encountered: