PUGXMultiUserBundle icon indicating copy to clipboard operation
PUGXMultiUserBundle copied to clipboard

wrong user instance while password reset

Open remoteclient opened this issue 10 years ago • 0 comments

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?

remoteclient avatar Feb 22 '16 11:02 remoteclient