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
Maybe this is already something that can be done, but I haven't found any simple or efficient way of doing this, so...
I think it would be great if there were a CLI command (likely wp user) that lists the sites a user is a member of in a multisite. Essentially, something that replicates the output of when you search for a user at the network level and it shows which (sub)sites that user is a member.
I know something can be done via shell, looping through the list of sites and checking for membership/role in each site, but that's time-consuming and clearly there's already functionality written that multisite uses in the GUI.
I imagine something like:
$ wp user site-list user
where it would be possible to use --field=site output as a --url= parameter to then update or remove the user from the site.
It would be an added bonus if the same could output what roles the user has in the site, but that part is easy and already exists if I can quickly get the list of sites to check.
The text was updated successfully, but these errors were encountered:
Maybe this is already something that can be done, but I haven't found any simple or efficient way of doing this, so...
I think it would be great if there were a CLI command (likely wp user) that lists the sites a user is a member of in a multisite. Essentially, something that replicates the output of when you search for a user at the network level and it shows which (sub)sites that user is a member.
I know something can be done via shell, looping through the list of sites and checking for membership/role in each site, but that's time-consuming and clearly there's already functionality written that multisite uses in the GUI.
I imagine something like:
$ wp user site-list user
ID | Sites
1 | www.site.com/subsite1
3 | www.site.com/subsite3
8 | www.site.com/subsite8
where it would be possible to use --field=site output as a --url= parameter to then update or remove the user from the site.
It would be an added bonus if the same could output what roles the user has in the site, but that part is easy and already exists if I can quickly get the list of sites to check.
The text was updated successfully, but these errors were encountered: