public function overviewAction() { $this->guard->userIsLoggedIn(); $this->logger->notice('User requested My Services page'); $user = $this->authenticatedUserProvider->getCurrentUser(); $specifiedConsentList = $this->specifiedConsentListService->getListFor($user); $this->logger->notice(sprintf('Showing %s services on My Services page', count($specifiedConsentList))); return new Response($this->templateEngine->render('OpenConextProfileBundle:MyServices:overview.html.twig', ['specifiedConsentList' => $specifiedConsentList])); }
/** * @param User $user * @return User */ private function enrichUserWithSupportContactEmail(User $user) { $entityIds = $this->authenticatedUserProvider->getCurrentUser()->getAuthenticatingAuthorities(); $authenticatingIdpEntityId = $this->getNearestAuthenticatingAuthorityEntityId($entityIds); if ($authenticatingIdpEntityId === null) { return $user; } $supportContactEmail = $this->supportContactEmailService->findSupportContactEmailForIdp($authenticatingIdpEntityId); if ($supportContactEmail === null) { return $user; } return $user->withSupportContactEmail($supportContactEmail); }