I want to create a user in the database from the PHP controller in Symfony.
I make the user entity with userInterface implementation, add up Security firewall with sha512 encode.
To insert the user I add new route:
user_create:
pattern: /create_user/{email}/{password}
defaults: { _controller: MyBundleBackendBundle:Security:create }
And add new method in Security controller:
public function createAction($email,$password) {
}
What code do I use inside the PHP controller action to create a user in the database with sha512 with a salt?
How to add a user in symfony from code: