/**
  * @return Response
  */
 public function overviewAction()
 {
     $this->guard->userIsLoggedIn();
     $this->logger->notice('Showing My Profile page');
     $user = $this->userService->getUser();
     return new Response($this->templateEngine->render('OpenConextProfileBundle:MyProfile:overview.html.twig', ['user' => $user]));
 }
 public function sendAttributeSupportMail()
 {
     $user = $this->userService->getUser();
     $body = $this->templateEngine->render('OpenConextProfileBundle:AttributeSupport:email.html.twig', ['attributes' => $user->getAttributes()]);
     /** @var Message $message */
     $message = $this->mailer->createMessage();
     $message->setFrom($this->mailFrom->getEmailAddress())->setTo($this->mailTo->getEmailAddress())->setSubject(sprintf('Personal debug info of %s', $user->getId()))->setBody($body, 'text/html', 'utf-8');
     $this->mailer->send($message);
 }
 public function overviewAction()
 {
     $this->guard->userIsLoggedIn();
     $attributeSupportMailForm = $this->formFactory->create('profile_attribute_support_mail', null, ['action' => $this->urlGenerator->generate('profile.attribute_support_send_mail')]);
     return new Response($this->templateEngine->render('OpenConextProfileBundle:AttributeSupport:overview.html.twig', ['attributes' => $this->userService->getUser()->getAttributes(), 'attributeSupportMailForm' => $attributeSupportMailForm->createView()]));
 }