diff --git a/churchinfo/CartToGroup.php b/churchinfo/CartToGroup.php index e2c8db6829..84c6654423 100644 --- a/churchinfo/CartToGroup.php +++ b/churchinfo/CartToGroup.php @@ -18,6 +18,9 @@ // Include the function library require "Include/Config.php"; require "Include/Functions.php"; +require_once "Service/GroupService.php"; + +$groupService = new GroupService(); // Security: User must have Manage Groups & Roles permission if (!$_SESSION['bManageGroups']) @@ -39,7 +42,7 @@ // Loop through the session array $iCount = 0; while ($element = each($_SESSION['aPeopleCart'])) { - AddToGroup($_SESSION['aPeopleCart'][$element['key']],$iGroupID,$iGroupRole); + $groupService->addUserToGroup($iGroupID, $_SESSION['aPeopleCart'][$element['key']], $iGroupRole); $iCount += 1; }