Page MenuHomePhabricator

Add formergroup to various user api queries
Open, LowPublicFeature

Description

Currently, list=allusers supports querying for users by their user_group using the augroup parameter. This is great and very useful. I'd also like to query users by their user_former_group. So I propose that we add a parameter called something like "auformergroup" that would allow for joining this table with user too.

Given that user_former_group seems to have similar indexes, I don't think this will incur any concerning additional load on the DBs.

query=userinfo and query=users should have a formergroups too

Event Timeline

For consistency query=userinfo and query=users should have a formergroups too...

Reedy renamed this task from Add auformergroup to list=allusers to Add formergroup to various user api queries.Mar 23 2017, 1:02 AM
Reedy updated the task description. (Show Details)

Given that user_former_group seems to have similar indexes, I don't think this will incur any concerning additional load on the DBs.

The index existing on user_former_group (on ufg_user, ufg_group) is sufficient for listing the former groups of particular users and for filtering when most users were formerly in the group, but to filter by groups that have not had many users removed (i.e. most cases, I believe) I think we would need an index on the ufg_group column, similar to the ug_group index on user_groups.

If someone is going to do that, it might be beneficial to at the same time turn the existing unique index into the primary key for the table.

Aklapper changed the subtype of this task from "Task" to "Feature Request".