public function needsRehash(string $hash): bool
    {
        if (!$this->isLoggedIn()) {
            return false;
        }

        return password_needs_rehash(
            $hash,
            PASSWORD_DEFAULT,
            ['cost' => self::PASSWORD_COST]
        );
    }