1
Fosuserbundle by default connects with email or username and password. But I want to change to CPF and password.
I created Cpfprovider, I wrote some classes, but I’m having to practically overwrite the whole Fosuserbundle to work.
1
Fosuserbundle by default connects with email or username and password. But I want to change to CPF and password.
I created Cpfprovider, I wrote some classes, but I’m having to practically overwrite the whole Fosuserbundle to work.
Browser other questions tagged symfony-2
You are not signed in. Login or sign up in order to post.
Hi Bruno, share your code, there are so many setup options of Fosuserbundle that it is difficult to give you practical advice. In theory it seems to me that you could inherit from User and simply use Cpf from the
userName
correct? You make a point of hiding the mapping ofuserName
for the CPF? If not I would leave everything as it is and just add apublic function getCpf()
pointing touserName
.– Anthony Accioly
To overwrite the
username
and persist it in a columncpf
use the annotationAttributeOverride
of Doctrine (see an example)– Anthony Accioly