Is there a way to let people sign up to a group?


(Salim Virani) #1

I have a bunch of private categories, each of which is seen only by members of a specific group for that category. I’d like a way for them to sign themselves up to those groups.

For example, when we run a conference, we want attendees of that event to receive access to a special category for that conference so they can exchange ideas privately.

Is there a way to give members of this group a special link to sign up or add themselves to their group? Not all of these groups have a common email domain. I’d like to give them, forum.com/signup/funevent/ and then when they’re signed up, they’re automatically assigned to that group so they have access.

Or is there another way to achieve this?

Thanks.


#2

not as of yet but has been requested as an enhancement to the groups


(Salim Virani) #3

Thanks Mike! Think this is doable via the API? I scanned it but didn’t see a way to add a user to a group or vice versa.


(Tom Newsom) #4

Yes it’s possible.

  1. /admin/groups.json will tell you the [group_id] of every group
  2. To add a member to a group
    curl -X PUT -d usernames=username -d api_key=ApiKeyGoesHere -d api_username=ApiUsernameGoesHere https://yoursite.tld/admin/groups/[group_id]/members.json?
  3. To delete a member from a group
    curl -X DELETE -d username=username -d api_key=ApiKeyGoesHere -d api_username=ApiUsernameGoesHere https://yoursite.tld/admin/groups/[group_id]/members.json?

Note that the PUT command accepts a comma separated list, but DELETE is one username at a time


#5

Is there a way to put the user in a group during the SSO process? Any params?


(Jeff Atwood) #6

I do think the group page should offer a way to join the group if allowed. It seems like something that should logically be present on that page.


(Jeff Atwood) #7

Joining a group via the group page is possible as of Discourse 1.7.


(Jeff Atwood) #8