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

AI 生成的摘要

The discussion revolves around the possibility of automatically adding or removing users from a group based on badge IDs. mr8 asks if it’s possible to grant group access, such as to a special category for active users, based on specific badge criteria like ‘50 liked posts in the last 60 days’. riking suggests using Trust Level 3 as a built-in alternative, but mr8 clarifies the need for a more customizable solution. marktheis expresses interest in the same feature. mr8 proposes a workaround using the API to periodically check badge status and update group membership. JammyDodger confirms that this functionality has now been implemented, linking to a meta post detailing the feature.

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 个赞

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 个赞

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

2 个赞

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 个赞

这现在已经实现了。 :partying_face:

2 个赞