Quantcast
Channel: FOSUserBundle Entity constuct - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Mun Mun Das for FOSUserBundle Entity constuct

$
0
0

You have to modify onSuccess method of RegistrationFormHandler class. Check Overriding Form Handlers section of the doc. In your overridden method you just have to add

$user->setRefId($this->request->cookies->get('ref_id'));

Right before calling the parent's onSuccess method.

As for validation you have to create custom validation constraint where you have to inject @request and @doctrine.orm.entity_manager services to get the cookie and validate it across the database. You can check this cookbook entry.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>