I would like to not use some default fields giving by the Sonata User bundle. Such as facebook, gplus or twitters fields.
I extended the SonataUserBundle in Application\Sonata\UserBundle with Easy-Extends.
And created a new User entity extenting the BaseUser :
class User extends BaseUser
I deleted the xml doctrine config since i'm using annotations.
So it does recognize my custom fields such as "city" and "address".
But i have all the fields from BaseUser, how can i get rid of unnecessary fields?
<?php
namespace Application\Sonata\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Sonata\UserBundle\Entity\BaseUser as BaseUser;
/**
* @ORM\Entity
* @ORM\Table(name="fos_user_user")
*/
class User extends BaseUser
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string", length=64, nullable=false, name="city")
*/
protected $city;
/**
* @ORM\Column(type="string", length=255, nullable=false, name="address")
*/
protected $address;
}