fetchPermissionUsers (function)

Return to Knowledgebase

Purpose

Retrieve a list of users who have a permission level

Location

users/helpers/permissions.php

Parameters

# Parameter Data Type Required Description
1 $permission_id Yes undocumented

Example

fetchPermissionUsers(2)

Further Documentation:

This is generally an internal UserSpice function and is not usually used by developers. Will return an array of objects. Each object will contain the id in the table user_permission_matches as well as the user id of the user with that permission level. So, if you have 10 users with that level, you will get an array of 10 objects.