I have entity User which extends FOSUserBundle.
class User extends BaseUser{... protected $ref_id; /** * @ORM\Column(type="float", length="11")...
ref_id comes from cookies variable ref_id. How can i pass this value to entity User each times new user is registering. Do i have to override registerAction or create constructor on entity User and somehow pass ref_id there ?
Additionaly, i need to validate (check from database) ref_id every time new user is registering. How can i do that ?
class User extends BaseUser { ... public function __construct() { $em = $this->getDoctrine()->getEntityManager();
This example doesn't work.