/** * Returns true if the given password hash from a cookie is the correct password for this user. * * @param string $passwordHash * @return boolean password correct */ public function checkCookiePassword($passwordHash) { if (PasswordUtil::isBlowfish($this->password) && PasswordUtil::secureCompare($this->password, PasswordUtil::getSaltedHash($passwordHash, $this->password))) { return true; } return false; }