title: Yii2 password hash
body: <p>I'd like to know how password hash is generated?</p>
  
  <pre><code>// This is my code:
  
  $email="mail@example.net";
  $password="mypassword";
  
  // How to get password_hash variable?
  
  $user = User::find()-&gt;where(['email'=&gt;$email, 'password_hash'=&gt;$password_hash])-&gt;one();
  if(isset($user)){
     echo "there is";
  } else {
   "Sorry!";  
  }
  </code></pre>
  
  <p>Thank you.</p>