You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected value of type "App\Entity\User" for association field "Sulu\Bundle\SecurityBundle\Entity\UserRole#$user", got "Sulu\Bundle\SecurityBundle\Entity\User" instead.
it seems like the default user role still use the Sulu User class instead of the overwritte one
Expected Behavior
User Role should use the model defined in sulu_security.yaml
Actual Behavior
When you follow this tutorial and overwrite ONLY the user entity
https://docs.sulu.io/en/2.4/cookbook/extend-entities.html
everything works fine until you register. when you create a new account you will see an error:
Expected value of type "App\Entity\User" for association field "Sulu\Bundle\SecurityBundle\Entity\UserRole#$user", got "Sulu\Bundle\SecurityBundle\Entity\User" instead.
it seems like the default user role still use the Sulu User class instead of the overwritte one
Expected Behavior
User Role should use the model defined in sulu_security.yaml
Steps to Reproduce
Code Example is here: https://github.com/OpenTribes/Framework/
Possible Solutions
in the class vendor/sulu/community-bundle/Form/Type/RegistrationType.php
in configureOptions there is a default UserEntity used.
in order to fix this behavoir i replaced empty_data with
and this way the registration works. i assume a UserEntityFactory could be use here somehow to get the overwritten entity
The text was updated successfully, but these errors were encountered: