Function __global->bump_member_group_timeout
Definitions
sources/group_member_timeouts.php
- Put a member into a usergroup temporarily / extend such a temporary usergroup membership.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member going in the usergroup |
| $group_id | GROUP | No | No | required parameter | N/A | N/A | The usergroup |
| $num_minutes | integer | No | No | required parameter | N/A | N/A | The number of minutes (may be negative to take time away) |
| $prefer_for_primary_group | boolean | No | No | False | N/A | N/A | Whether to put the member into as a primary group if this is a new temporary membership (it is recommended to NOT use this, since we don't track the source group and hence on expiry the member is put back to the first default group - but also generally you probably don't want to box yourself in with moving people's primary group, it ties your future flexibility down a lot) |
Preview
Code (PHP)
/**
* Put a member into a usergroup temporarily / extend such a temporary usergroup membership.
*
* @param MEMBER $member_id The member going in the usergroup
* @param GROUP $group_id The usergroup
* @param integer $num_minutes The number of minutes (may be negative to take time away)
* @param boolean $prefer_for_primary_group Whether to put the member into as a primary group if this is a new temporary membership (it is recommended to NOT use this, since we don't track the source group and hence on expiry the member is put back to the first default group - but also generally you probably don't want to box yourself in with moving people's primary group, it ties your future flexibility down a lot)
*/
function bump_member_group_timeout(int $member_id, int $group_id, int $num_minutes, bool $prefer_for_primary_group = false)
* Put a member into a usergroup temporarily / extend such a temporary usergroup membership.
*
* @param MEMBER $member_id The member going in the usergroup
* @param GROUP $group_id The usergroup
* @param integer $num_minutes The number of minutes (may be negative to take time away)
* @param boolean $prefer_for_primary_group Whether to put the member into as a primary group if this is a new temporary membership (it is recommended to NOT use this, since we don't track the source group and hence on expiry the member is put back to the first default group - but also generally you probably don't want to box yourself in with moving people's primary group, it ties your future flexibility down a lot)
*/
function bump_member_group_timeout(int $member_id, int $group_id, int $num_minutes, bool $prefer_for_primary_group = false)

