title: How to generate token to validate account via url?
body: <p>In my system the registrations will not be allowed for any users. They must be invited by email.</p>
  
  <p>I need to validate that the user is active on the system. To make this the users will receive an email with an certain url that validate your account. </p>
  
  <p>This url (route) could contain <strong>user identification</strong> and your <strong>validation code</strong> saved on the database after "pre-registration". </p>
  
  <pre><code>hostname/accountConfirm?user=token&amp;cod=userCodeSavedOnTheDatabase
  </code></pre>
  
  <p>The token must be generated from user email. </p>
  
  <p>How i can generate the token and check it to identify user?</p>