diff --git a/src/Application/Actions/Group/AddUserGroupAction.php b/src/Application/Actions/Group/AddUserGroupAction.php index f09e084acd52c0c497720d0fe3b74d9a3a513339..04155ee646c865f1c02a1fbfda4423a99693c10b 100755 --- a/src/Application/Actions/Group/AddUserGroupAction.php +++ b/src/Application/Actions/Group/AddUserGroupAction.php @@ -20,8 +20,7 @@ class AddUserGroupAction extends GroupAction if (!isset($group)) { throw new GroupNotFoundException(); } - $userRepository = $this->em->getRepository('App\Domain\User\User'); - $currentUser = $userRepository->find($_SESSION['userId']); + $currentUser = $this->userRepository->find($_SESSION['userId']); $currentUser->addGroup($group); $this->em->persist($group);