Function __global->has_category_access
Definitions
sources/permissions.php
- Find if a member has access to a specified category.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member being checked whether to have the access |
| $permission_module | ID_TEXT | No | No | required parameter | N/A | N/A | The permission module being checked for category access |
| $category | ID_TEXT | No | No | required parameter | N/A | N/A | The category being checked for access (often, a number cast to a string) |
Returns
- Whether the member has category access
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find if a member has access to a specified category.
*
* @param MEMBER $member_id The member being checked whether to have the access
* @param ID_TEXT $permission_module The permission module being checked for category access
* @param ID_TEXT $category The category being checked for access (often, a number cast to a string)
* @return boolean Whether the member has category access
*/
function has_category_access(int $member_id, string $permission_module, string $category) : bool
* Find if a member has access to a specified category.
*
* @param MEMBER $member_id The member being checked whether to have the access
* @param ID_TEXT $permission_module The permission module being checked for category access
* @param ID_TEXT $category The category being checked for access (often, a number cast to a string)
* @return boolean Whether the member has category access
*/
function has_category_access(int $member_id, string $permission_module, string $category) : bool

