Function __global->has_page_access
Definitions
sources/permissions.php
- Find if a member has access to a specified page, in a specific zone. Note that page access does not imply zone access; you have access a page, but not the zone, so still couldn't see it.
- 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 |
| $page | ID_TEXT | No | No | required parameter | N/A | N/A | The page being checked |
| $zone | ID_TEXT | No | No | required parameter | N/A | N/A | The zone being checked |
| $at_now | boolean | No | No | False | N/A | N/A | Whether we want to check we have access to the CURRENT page, using any match-key permissions |
Returns
- Whether the member has page access
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find if a member has access to a specified page, in a specific zone. Note that page access does not imply zone access; you have access a page, but not the zone, so still couldn't see it.
*
* @param MEMBER $member_id The member being checked whether to have the access
* @param ID_TEXT $page The page being checked
* @param ID_TEXT $zone The zone being checked
* @param boolean $at_now Whether we want to check we have access to the CURRENT page, using any match-key permissions
* @return boolean Whether the member has page access
*/
function has_page_access(int $member_id, string $page, string $zone, bool $at_now = false) : bool
* Find if a member has access to a specified page, in a specific zone. Note that page access does not imply zone access; you have access a page, but not the zone, so still couldn't see it.
*
* @param MEMBER $member_id The member being checked whether to have the access
* @param ID_TEXT $page The page being checked
* @param ID_TEXT $zone The zone being checked
* @param boolean $at_now Whether we want to check we have access to the CURRENT page, using any match-key permissions
* @return boolean Whether the member has page access
*/
function has_page_access(int $member_id, string $page, string $zone, bool $at_now = false) : bool

