Sets the registration date on the user entity/record.

@param  FilterUserResponseEvent $event
170480
public function setRegistrationDate(FilterUserResponseEvent $event)
    {
        /** @var \XM\SecurityBundle\Entity $user */
        $user = $event->getUser();

        $user->setRegistrationDate(new \DateTime());
        $this->userManager->updateUser($user);
    }
393619
public function onKernelResponse(FilterResponseEvent $event)
    {
        /**
         * Only flushes if exists AnnotationFlush as a controller annotations.
         */
        if ($this->mustFlush) {

            /**
             * Flushing manager.
             */
            $this
                ->manager
                ->flush($this->entities);
        }
    }
1138887
public function onKernelResponse(FilterResponseEvent $event)
    {
        $event->getResponse()->headers->set(
            'Content-Language',
            implode(', ', $this->utils->getLanguages())
        );
    }
209199
public function setDefaultUser(ConfigureOptionsEvent $event)
    {
        $optionsResolver = $event->getOptions();

        $optionsResolver->setDefault(static::USER_OPTION, null);

        if (null === $this->tokenStorage) {
            return;
        }

        $token = $this->tokenStorage->getToken();

        if (null === $token || $token instanceof AnonymousToken) {
            return;
        }

        $user = $token->getUser();

        if (!$user instanceof UserInterface) {
            return;
        }

        $optionsResolver->setDefault(static::USER_OPTION, $user->getId());
    }
733191
public function afterRegister(Event $event)
    {
        if ($event->subject->success) {
            $this->_setUser($event->subject->entity->toArray());
            $this->_setJwt($event->subject->entity->id);
            $this->_sendToken($event, 'register');
        }
    }
995706
public function onKernelResponse(FilterResponseEvent $event)
    {
        $response = $event->getResponse();
        $request = $event->getRequest();

        $ifNoneMatch = $request->headers->get('if-none-match');
        $etag = $response->headers->get('ETag', 'empty');

        if ($ifNoneMatch === $etag) {
            $response->setStatusCode(304);
            $response->setContent(null);
        }
    }
994988
public function onResponseLate(FilterResponseEvent $event)
    {
        if (!$this->eventRequestMatches($event)) {
            return;
        }
        $this->responseTransformer->transformLate($event->getRequest(), $event->getResponse());
    }
75037
public function setDateRegistration($date_registration){
        if(!$this->setModified('date_registration', $date_registration)->isModified()){
            return $this;
        }
        $this->date_registration = $date_registration;

        return $this;
    }
1224467
public function onKernelResponse(FilterResponseEvent $event)
    {
        $response = $event->getResponse();
        $request  = $event->getRequest();
        if (!$event->isMasterRequest())
        {
            return;
        }
        if ($request->isXmlHttpRequest())
        {
            return;
        }
        $this->_injectDatatableScript($response, $request);
    }
963040
public function onKernelResponse(FilterResponseEvent $event)
    {
        if (!$event->isMasterRequest()) {
            return;
        }

        $response = $event->getResponse();

        if ($response instanceof StreamedResponse) {
            $response->send();
        }
    }
1268906
public function addSetCookieHeader(FilterResponseEvent $event)
    {
        if (!$this->targetGroupStore->hasChangedTargetGroup()
            || $event->getRequest()->getPathInfo() === $this->targetGroupUrl
        ) {
            return;
        }

        $response = $event->getResponse();

        $response->headers->setCookie(
            new Cookie(
                $this->targetGroupCookie,
                $this->targetGroupStore->getTargetGroupId(true),
                AudienceTargetingCacheListener::TARGET_GROUP_COOKIE_LIFETIME
            )
        );

        $response->headers->setCookie(
            new Cookie(
                $this->visitorSessionCookie,
                time()
            )
        );
    }
1245293
public function beforeFilter($event)
    {
        $this->setController($event->subject());

        if ($this->Controller->Manager->prefix('admin')) {
            if (method_exists($this->Controller, 'initPostTypes')) {
                $this->Controller->initPostTypes($event);
            }
        }
    }
795628
public function onKernelResponse(FilterResponseEvent $event)
    {
        $lockName = $event->getRequest()->attributes->get('writeLockOn', null);
        if (!is_null($lockName)) {
            $this->cache->delete($lockName);
            $this->logger->info("LOCK REMOVED = ".$lockName);
        }
    }
1264994
public function afterRegister($event, $user)
    {
        $sendMail = key_exists('sendMail', $event->data) ? $event->data['sendMail'] : true;
        if ($sendMail) {
            if (Configure::read('CM.ActivationOnRegister')) {
                $this->activation($user);
            }
        }
    }
239204
public function onKernelResponse(FilterResponseEvent $event)
    {
        if ($this->mustLog) {

            /**
             * Only logs before controller execution if EXEC_POST or EXEC_BOTH.
             */
            if (in_array($this->execute, [AnnotationLog::EXEC_POST, AnnotationLog::EXEC_BOTH])) {
                $this->logMessage(
                    $this->logger,
                    $this->level,
                    $this->value
                );
            }
        }
    }
870462
public function onKernelResponse(FilterResponseEvent $event)
    {
        $response = $event->getResponse();
        if (!$event->isMasterRequest() || !$response->isRedirect()) {
            return;
        }

        if (!$this->isPlatformUIRequest($event->getRequest())) {
            return;
        }

        $response->setStatusCode(Response::HTTP_RESET_CONTENT);
        $response->headers->set('PJAX-Location', $response->headers->get('Location'));
        $response->headers->remove('Location');
    }
908848
public function setCurrentVersionHeader(FilterResponseEvent $event)
    {
        if ($this->version) {
            $event->getResponse()->headers->set(self::HEADER_NAME, $this->version);
        }
    }