/** * 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) { return $this->password == StringUtil::encrypt($this->salt . $passwordHash); }