Any way to programmatically add to groups?


(Michael Downey) #1

I’d like to have several groups that are automatically populated with accounts older than N days. The idea being that as user accounts age, new categories would open up to them based on the age of their account.

I can figure out how to do this with badges, but I can’t grant access to categories based on badges.

Is there any way to do what I described above?

(Rafael dos Santos Silva) #2

There is some discussion about it, but the feature ins’t on core roadmap.

(Jeff Atwood) #3

Hmm, why not just use the existing trust levels to do this?

Otherwise you’d have categories open up to people who created an account 45 days ago but did nothing.

(Michael Downey) #4

Trust levels is close, but it’s limited to the pre-defined few groups. In my specific use case, I’d need more … basically the idea is creating cohorts based on join date.

(Jeff Atwood) #5

I suggest a small app that moves users into groups using the Discourse API based on account age. Then the categories can key on the groups as they do.

(Michael Downey) #6

Yes, that’s Plan B, but possibly with LDAP groups…

(Rafael dos Santos Silva) #7

I my use case I would create groups based on employee data, like branch id and position.

Better handle this through API then.