I'm not sure how to programmatically add customer to one of previously created customer groups when he/she registers.

There are 2 groups:

  1. General customer - basic group
  2. Regular customer - customer needs to be added there if he/she requests a regular customer card

I need to add a customer to the latter group programmatically. Any ideas?

1 Answer 1


There is two way to achieve this functionality :

  1. Call the event customer_register_success and change the user group just after registration.

Follow this solution : Set customer group from customer registration form

  1. Create a stand alone page where you have to get customer collection according to your filter condition and set the new user group and save the customer.
  • This link correspond to the Magento 1 but question is about the Magento 2 Commented Nov 9, 2016 at 11:09
  • @SiarheyUchukhlebau, check updated answer Commented Nov 9, 2016 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.