UserGroupLookupInterface
interface UserGroupLookupInterface (View source)
Read access to user groups and their membership by user.
Methods
Find a group by name
Id of the group with exactly this name, accent-exact so an IdP-asserted claim cannot map to a look-alike group.
Find all groups
Return the subset of supplied IDs that actually exist in user_groups.
Find groups by user ID (groups the user belongs to)
Find the groups each of the supplied users belongs to
Get the IDs of the groups the user belongs to
Count all groups
Details
UserGroup|null
findById(int $id)
Find a group by ID
UserGroup|null
findByName(string $name)
Find a group by name
int|null
findIdByExactName(string $name)
Id of the group with exactly this name, accent-exact so an IdP-asserted claim cannot map to a look-alike group.
array
findAll()
Find all groups
array
findExistingIds(array $ids)
Return the subset of supplied IDs that actually exist in user_groups.
array
findByUserId(int $userId)
Find groups by user ID (groups the user belongs to)
array
findByUserIds(array $userIds)
Find the groups each of the supplied users belongs to
array
getGroupIdsForUser(int $userId)
Get the IDs of the groups the user belongs to
int
countAll()
Count all groups