From 03ee0b83ae2fd552a57b8cb1dbec2102e409e04a Mon Sep 17 00:00:00 2001 From: Moreau Elise <moreau.elise13@gmail.com> Date: Sun, 18 Oct 2020 14:14:16 +0200 Subject: [PATCH] bug correction with id --- src/Application/Actions/Group/AddUserGroupAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application/Actions/Group/AddUserGroupAction.php b/src/Application/Actions/Group/AddUserGroupAction.php index cff8adf..c278acd 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); -- GitLab