Automatically add/remove users to/from a group based on badge id?

Would it be possible to somehow automatically add/remove a user from a group based on a certain badge ID ( or IDs)?

e.g. - add users to X Group if they have have badge_id 12 (50 liked posts in past 60 days)?

2 Likes

Groups are used for category security, and the closest thing to “50 liked posts in last 60 days” is Trust Level 3, which has an automatic group (trust_level_3). Does just using the TL3 lounge, which comes with your install by default, work for you?

That was just an example, but we’d like to give our active users who post great stuff (hence the ‘last 60 days part’ which we could query via the Badge Query) special access to an extra category where we posts betas and previews.

Actually, would it be possible to grant group access via some query similar to the way we grant badges?

2 Likes

I’m also interested in this… Did you find a way to do it?

2 Likes

Would really be great if this becomes a core feature since plugins seem pretty fragile with updates!

Until then, I’m thinking of maybe doing this via the api - have a script query a badge_id (/user_badges.json?badge_id=XX) every few days and grant/remove users from the group (PUT/DELETE the user(s) on /admin/groups/XX/members.json)…

2 Likes

This is now a thing. :partying_face:

1 Like