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

@@ 107-113 (lines=7) @@
104
    {
105
        $user = new User();
106
        $form = $this->createForm(new UserType(), $user);
107
        if ($form->handleRequest($request)->isValid()) {
108
            $user->setEnabled(true);
109
            $userManager = $this->get('fos_user.user_manager');
110
            $userManager->updateUser($user);
111
112
            return $this->redirectToRoute('users_show', array('id', $user->getId()));
113
        }
114
115
        return array(
116
            'user' => $user,