Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Change email notification subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
aquibbaig committed Aug 8, 2019
1 parent 6c8275c commit 28ec012
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions site/src/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ public function notificationSettingsAction(Request $request)

$form = $this->createForm(NotificationSubscriptionType::class, $user);

$form->handleRequest($request);

if ($form->isSubmitted() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($user);
$em->flush();
}

return $this->render(
'user/settings_notification.html.twig',
['user' => $user, 'form' => $form->createView()]
Expand Down

0 comments on commit 28ec012

Please sign in to comment.