Function __global->has_submit_permission
Definitions
sources/permissions.php
- Find if a member has permission to submit.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $range | string | No | No | required parameter | low mid high cat_low cat_mid cat_high | N/A | The range of privilege we are checking to see if they have; these ranges are like trust levels |
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member being checked whether to have the access |
| $ip | IP | No | No | required parameter | N/A | N/A | The member's IP address |
| $page | ?ID_TEXT | No | No | required parameter | N/A | N/A | The page being checked (null: current page) |
| $cats | ?array | No | No | Null | N/A | N/A | A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A) |
Returns
- Whether the member can submit in this range
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find if a member has permission to submit.
*
* @param string $range The range of privilege we are checking to see if they have; these ranges are like trust levels
* @set low mid high cat_low cat_mid cat_high
* @param MEMBER $member_id The member being checked whether to have the access
* @param IP $ip The member's IP address
* @param ?ID_TEXT $page The page being checked (null: current page)
* @param ?array $cats A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
* @return boolean Whether the member can submit in this range
*/
function has_submit_permission(string $range, int $member_id, string $ip, ?string $page, ?array $cats = null) : bool
* Find if a member has permission to submit.
*
* @param string $range The range of privilege we are checking to see if they have; these ranges are like trust levels
* @set low mid high cat_low cat_mid cat_high
* @param MEMBER $member_id The member being checked whether to have the access
* @param IP $ip The member's IP address
* @param ?ID_TEXT $page The page being checked (null: current page)
* @param ?array $cats A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
* @return boolean Whether the member can submit in this range
*/
function has_submit_permission(string $range, int $member_id, string $ip, ?string $page, ?array $cats = null) : bool

