- // handle adding new user
- $newUser = $userManager->createUser();
- // enable created user by default
- $newUser->setEnabled(true);
- $newUserForm = $this->createForm(NewUserType::class, $newUser, array(
- 'validation_groups' => array('Profile'),
- 'action' => $this->generateUrl('config').'#set6',
- ));
- $newUserForm->handleRequest($request);
-
- if ($newUserForm->isValid() && $this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) {
- $userManager->updateUser($newUser, true);
-
- $config = new Config($newUser);
- $config->setTheme($this->container->getParameter('theme'));
- $config->setItemsPerPage($this->container->getParameter('items_on_page'));
- $config->setRssLimit($this->container->getParameter('rss_limit'));
- $config->setLanguage($this->container->getParameter('language'));
-
- $em->persist($config);
+ $newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, ['action' => $action]);
+ $newTaggingRule->handleRequest($request);