validatePassword() public method

Verifies a password against a hash.
See also: generatePasswordHash()
public validatePassword ( string $password, string $hash ) : boolean
$password string The password to verify.
$hash string The hash to verify the password against.
return boolean whether the password is correct.
Beispiel #1
0
 /**
  * Validates password
  *
  * @param  string $password password to validate
  * @return boolean if password provided is valid for current user
  */
 public function validatePassword($password)
 {
     $security = new Security();
     return $security->validatePassword($password, $this->password);
 }