Skip to content

$fn.getGroups(option)

Retrieves all groups that exist in the user manager. "asynchronous"

Arguments

NameTypeDescription
optionobjectSpecify whether to include invalid users

Option Details

NameTypeDescription
containUsersbooleantrue: Include users belonging to the group
false: Do not include users belonging to the group
Default is true

Return value

TypeDescription
Promise<Group[]>Group list
ObjectPropertyTypeDescription
GroupgroupNamestringGroup Name
descriptionstringDescription
membersobject arrayActive user array belonging to group

Sample

try {
// Obtain group information not including users belonging to the group
const groups = await $fn.getGroups({containUsers:false});
console.log(groups);
} catch (err) {
console.log("Error", err);
}