diff --git a/src/Application/Actions/Group/AddUserGroupAction.php b/src/Application/Actions/Group/AddUserGroupAction.php
index cff8adf5f3df9bda27e49a9118e54c7f28a1eec7..c278acddf7112740a479826029b2203ac9994429 100755
--- a/src/Application/Actions/Group/AddUserGroupAction.php
+++ b/src/Application/Actions/Group/AddUserGroupAction.php
@@ -22,7 +22,7 @@ class AddUserGroupAction extends GroupAction
         }
     
         $currentUser = $this->userRepository->find($_SESSION['userId']);
-        if ($this->group->hasUser($currentUser)){
+        if ($group->hasUser($_SESSION['userId'])){
             return $this->response
             ->withHeader('Location', '/groups/' . $groupId)
             ->withStatus(302);