I've created in website extra customer field: Username

enter image description here

Does anyone have any solution to automatically generate this field with username immediately after registration?

I see some like this: https://www.rakeshjesadiya.com/how-to-generate-random-string-or-number-in-magento-2/

can anyone help me how can i implement it?

  • 1
    You can use a plugin to catch the before or around execute method: \Magento\Customer\Controller\Account\CreatePost::execute – Fernando Molina Apr 7 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.