How to automatically set group and primary_group for the user?

Hey there Folks!

The usecase is pretty straightfoward. We want folks with our company domain to be automatically added to my_company_employees group and set it as a primary group for them while anyone else with different email domain to be added to external_users group and have it set as a primary group.

Right now it’s only possible to match people with specific email domains. What about setting it the way that if somebody doesn’t match the email domain pattern, they get automatically added to certain group?

Thanks for help!

I think you’d need a plugin.

But what problem is the not-an-employee group going to solve?

1 Like

No longer a valid question but thanks for making me thing. I simply used primary_group_id is NULL.
Thanks for help Jay!

2 Likes