I want group membership of user of type system administrator. I used

Certified Associate Developer
I want group membership of user of type system administrator.

I used getgroupsformemberuser() to get list of groups where user is member.
I used getgroupsforadminuser() to get list of groups that a given user is an administrator but it returns system groups. For basic user, same function returns list of groups that a given user is an administrator.

Is there any other function i can use?

OriginalPostID-215085

OriginalPostID-215085

  Discussion posts and replies are publicly visible

Parents
  • I do not believe there is a function to return the groups for which a system admin is an administrator. A system admin can perform the functions of an admin for every group, even if they are not explicitly added as an admin, so there usually isn't a need to return that list of groups. You can use the function isUserSystemAdministrator() to first check if the user is a system admin before running the getgroupsforadminuser() to ensure you don't get the system groups in your results.
Reply
  • I do not believe there is a function to return the groups for which a system admin is an administrator. A system admin can perform the functions of an admin for every group, even if they are not explicitly added as an admin, so there usually isn't a need to return that list of groups. You can use the function isUserSystemAdministrator() to first check if the user is a system admin before running the getgroupsforadminuser() to ensure you don't get the system groups in your results.
Children
No Data