I'm trying to setup my FOSUserBundle 2.0 for Symfony 4.3 following this documentation: https://symfony.com/doc/2.1/bundles/FOSUserBundle/index.html
I created a new member class that extends FOSUser like in the documentation:
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
class NewMember extends BaseUser
{
/**
* @var int
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;
/**
* @var string
*
* @ORM\Column(name="displayName", type="string", length=50, nullable=true)
*/
protected $displayName;
I configure user_class in fos_user.yaml:
# config/packages/fos_user.yaml
fos_user:
db_driver: orm # other valid values are 'mongodb' and 'couchdb'
firewall_name: main
user_class: App\Entity\Main\NewMember
from_email:
address: "test@domain.com"
sender_name: "test@domain.com"
I use the fos_user.registration.form.factory but my registration form always get the same fields, no matter what I do:
Email
Username
Password
Repeat password
Any help is appreciated. Thank you in advance.