Function __global->cns_may_post_in_topic
Definitions
sources/cns_posts.php
- Find whether a member may post in a certain topic.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $forum_id | ?AUTO_LINK | No | No | required parameter | N/A | N/A | The forum ID of the forum the topic is in (null: private topics) |
| $topic_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The topic ID is in |
| $last_member_id | ?MEMBER | No | No | Null | N/A | N/A | The last poster in the topic (null: do not check for double posting) |
| $closed | boolean | No | No | False | N/A | N/A | Whether this topic is closed |
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member (null: current member) |
| $will_be_private_post | boolean | No | No | False | N/A | N/A | Whether this post will be private |
Returns
- The answer
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find whether a member may post in a certain topic.
*
* @param ?AUTO_LINK $forum_id The forum ID of the forum the topic is in (null: private topics)
* @param AUTO_LINK $topic_id The topic ID is in
* @param ?MEMBER $last_member_id The last poster in the topic (null: do not check for double posting)
* @param boolean $closed Whether this topic is closed
* @param ?MEMBER $member_id The member (null: current member)
* @param boolean $will_be_private_post Whether this post will be private
* @return boolean The answer
*/
function cns_may_post_in_topic(?int $forum_id, int $topic_id, ?int $last_member_id = null, bool $closed = false, ?int $member_id = null, bool $will_be_private_post = false) : bool
* Find whether a member may post in a certain topic.
*
* @param ?AUTO_LINK $forum_id The forum ID of the forum the topic is in (null: private topics)
* @param AUTO_LINK $topic_id The topic ID is in
* @param ?MEMBER $last_member_id The last poster in the topic (null: do not check for double posting)
* @param boolean $closed Whether this topic is closed
* @param ?MEMBER $member_id The member (null: current member)
* @param boolean $will_be_private_post Whether this post will be private
* @return boolean The answer
*/
function cns_may_post_in_topic(?int $forum_id, int $topic_id, ?int $last_member_id = null, bool $closed = false, ?int $member_id = null, bool $will_be_private_post = false) : bool
