Code Duplication    Length = 6-7 lines in 2 locations

src/AppBundle/Controller/Install/InstallController.php 1 location

@@ 73-78 (lines=6) @@
70
            'action' => $this->generateUrl('gs_install_st1'),
71
        ));
72
    
73
        if ($form->handleRequest($request)->isValid()) {
74
            $user->setEnabled(true);
75
            $userManager = $this->get('fos_user.user_manager');
76
            $userManager->updateUser($user);
77
            $this->addFlash('info', 'gestock.install.st1.flash');
78
        }
79
        
80
        return array(
81
            'message' => $message,

src/AppBundle/Controller/UserController.php 1 location

@@ 97-103 (lines=7) @@
94
    {
95
        $user = new User();
96
        $form = $this->createForm(new UserType(), $user);
97
        if ($form->handleRequest($request)->isValid()) {
98
            $user->setEnabled(true);
99
            $userManager = $this->get('fos_user.user_manager');
100
            $userManager->updateUser($user);
101
102
            return $this->redirectToRoute('user_show', array('id', $user->getId()));
103
        }
104
105
        return array(
106
            'user' => $user,