GroupRule getRuleById
GroupRule_getRuleById
Get a group rule object by its id. If no rule is found with that id, empty will be returned.
Syntax
GroupRule_getRuleById(ruleId)
Arguments
- ruleId: is a number expression. It is the group rule's id, which can be found in the group's Rule tab
Return value
An array, it is the group rule object, which has following items
Index |
Data type |
Value |
GROUPRULE_ID |
number |
Id of the group rule |
GROUPRULE_NAME |
string |
Name of the group rule |
GROUPRULE_TARGET |
number |
Target of the group rule |
GROUPRULE_INCLUDE_DELETED |
bool |
If the group rule includes deleted users |
GROUPRULE_INCLUDE_DISABLED |
bool |
If the group rule includes disabled users |
Example
array rule = GroupRule_getRuleById(101919);
rule[GROUPRULE_TARGET] = GROUPRULE_TARGET_UNLIMITED;
GroupRule_save(rule);
Availability
Version 5.6