addPermission (function)

Return to Knowledgebase

Purpose

Adds a permission level to a user

Location

users/helpers/permissions.php

Parameters

# Parameter Data Type Required Description
1 $permission_ids Yes undocumented
2 $members Yes undocumented

Example

addPermission([2,3,4], [2,36,38])

Further Documentation:

This is primarily used by the UI and is not generally used by developers. You can add an array of permissions to an array of users. In the example above, you would add permission ids 2,3, and 4 to users 2,36 and 38.