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