Function __global->may_view_content_behind
Definitions
sources/content.php
- Given a particular bit of feedback content, check if the user may access 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 | User to check |
| $content_type | ID_TEXT | No | No | required parameter | N/A | N/A | Content type |
| $content_id | ID_TEXT | No | No | required parameter | N/A | N/A | Content ID |
| $type_has | ID_TEXT | No | No | content_type | N/A | N/A | Type of content type / ID |
Returns
- Whether there is permission
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Given a particular bit of feedback content, check if the user may access it.
*
* @param MEMBER $member_id User to check
* @param ID_TEXT $content_type Content type
* @param ID_TEXT $content_id Content ID
* @param ID_TEXT $type_has Type of content type / ID
* @return boolean Whether there is permission
*/
function may_view_content_behind(int $member_id, string $content_type, string $content_id, string $type_has = 'content_type') : bool
* Given a particular bit of feedback content, check if the user may access it.
*
* @param MEMBER $member_id User to check
* @param ID_TEXT $content_type Content type
* @param ID_TEXT $content_id Content ID
* @param ID_TEXT $type_has Type of content type / ID
* @return boolean Whether there is permission
*/
function may_view_content_behind(int $member_id, string $content_type, string $content_id, string $type_has = 'content_type') : bool

