diff --git a/Model/GrouperGroup.php b/Model/GrouperGroup.php index fd4184e..f26f219 100644 --- a/Model/GrouperGroup.php +++ b/Model/GrouperGroup.php @@ -589,27 +589,27 @@ public function getGroupMembers(string $actorUserId, string $groupName, array $c * - the User(me) has a role of owner/admin * - the User (member User) is a member * - * @param string $actorUserId - * @param string $userId + * @param string $managerId User(me) has a role of owner/admin + * @param string $userId User (member User) is a member * @param array $cfg * * @return array * @throws GrouperLiteWidgetException * @since COmanage Registry v4.4.0 */ - public function getManagedUsers(string $actorUserId, string $userId, array $cfg): array { - if(empty($userId) || empty($actorUserId)) { + public function getManagedUsers(string $managerId, string $userId, array $cfg): array { + if(empty($userId) || empty($managerId)) { return false; } $this->initApi($cfg); try { - $resultsManagerAdmin = $this->grouperAPI->getUserMemberships($userId, - $actorUserId, + $resultsManagerAdmin = $this->grouperAPI->getUserMemberships($managerId, + $managerId, GrouperGroupTypeEnum::ADMIN); - $resultsManagerUpdate = $this->grouperAPI->getUserMemberships($userId, - $actorUserId, + $resultsManagerUpdate = $this->grouperAPI->getUserMemberships($managerId, + $managerId, GrouperGroupTypeEnum::UPDATE); } catch (Exception $e) { CakeLog::write('error', __METHOD__ . ': An error occurred'); @@ -620,7 +620,7 @@ public function getManagedUsers(string $actorUserId, string $userId, array $cfg) try { // Groups the user is a member of - $membersGroup = $this->grouperAPI->getUserGroups($actorUserId, $userId); + $membersGroup = $this->grouperAPI->getUserGroups($managerId, $userId); } catch (Exception $e) { CakeLog::write('error', __METHOD__ . ': An error occurred'); throw $e;