PUGX / PUGXMultiUserBundle

An extension for FOSUserBundle to handle users of different types. Compatible with Doctrine ORM.
163 stars 96 forks source link

wrong user instance while password reset #102

Open remoteclient opened 8 years ago

remoteclient commented 8 years ago

Hello everybody,

I am on Symfony 2.7.7 and using this bundle. Everything works as expected except for the reset. I have two user class. One is the SecurityUser user for admins and the other one is the employee.

If I click on "Forgotten Password" and enter the username or the email of an SecurityUser all goes right. If I do the same with an Employee I recieve the email with the token. When I follow the link with the token I get following error message:

The form's view data is expected to be an instance of class MWS\SecurityBundle\Entity\SecurityUser, but is an instance of class MWS\JescEmployeeBundle\Entity\Employee. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class MWS\JescEmployeeBundle\Entity\Employee to an instance of MWS\SecurityBundle\Entity\SecurityUser.

Can anybody conform this issue and know how to solve it?