public function setFeUserCookie(&$parameters, $parentObject)
    {
        if ($parentObject->fe_user->dontSetCookie) {
            // do not set any cookie
            return;
        }

        $started = $parentObject->fe_user->loginSessionStarted;

        $cookieService = GeneralUtility::makeInstance(CookieService::class);
        if (($started || $parentObject->fe_user->forceSetCookie) && 0 === $parentObject->fe_user->lifetime) {
            // If new session and the cookie is a sessioncookie, we need to set it only once!
            // // isSetSessionCookie()
            $cookieService->setCookie(0);
        } elseif (($started || isset($_COOKIE[CookieService::FE_COOKIE_NAME])) && $parentObject->fe_user->lifetime > 0) {
            // If it is NOT a session-cookie, we need to refresh it.
            // isRefreshTimeBasedCookie()
            $cookieService->setCookie((new DateTimeService())->getCurrentTime() + $parentObject->fe_user->lifetime);
        }
    }