how to set the group for new user automatically with the security modul

hi,
i have added the security modul to my project. I have three types of users. seller, buyer and admin of course.
When a new user sign up with the sec_form_add_users application. It has no value in the user_group table by default.
What is the proper way to assign automatically the buyer status on sign up? Actually i want the buyer status by default.
many thanks in advance!

could you try updating the default value of the DB from the field options, try adding the group field to have auto value on insert and set your buyer group id? not sure but give it a try, seems logic :slight_smile:

Don’t know what DB engine you are using - but one way is you can, in the “onAfterInsert” event in that form, run an SQL INSERT into the “xxx_users_groups” table (xxx is usually “sec”) assigning the default groupid you want to the userid “login”)