Difference between revisions of "GroupRule getRuleById"

From Catglobe Wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Group_Functions]]
+
{{HelpFiles}}

+
 
 +
== 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
 +
 
 +
[[Image:6257.jpg]]  
 +
 
 +
'''Return value'''
 +
 
 +
An ''array'', it is the group rule object, which has following items
 +
 
 +
 
 +
 
 +
{| width="875" cellspacing="0" cellpadding="2" border="1" style="border-collapse:collapse; border:1px solid #010101" class="tableintopic"
 +
|- align="left" valign="top"
 +
| width="292" bgcolor="#C0C0C0" style="border:1px solid #010101;" |
 +
'''Index'''
 +
 
 +
| width="292" bgcolor="#C0C0C0" style="border:1px solid #010101;" |
 +
'''Data type'''
 +
 
 +
| width="292" bgcolor="#C0C0C0" style="border:1px solid #010101;" |
 +
'''Value'''
 +
 
 +
|- align="left" valign="top"
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">GROUPRULE_ID</span>
 +
 
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">number</span>
 +
 
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">Id of the group rule</span>
 +
 
 +
|- align="left" valign="top"
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">GROUPRULE_NAME</span>
 +
 
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">string</span>
 +
 
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">Name of the group rule</span>
 +
 
 +
|- align="left" valign="top"
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">GROUPRULE_TARGET</span>
 +
 
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">number</span>
 +
 
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">Target of the group rule</span>
 +
 
 +
|- align="left" valign="top"
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">GROUPRULE_INCLUDE_DELETED</span>
 +
 
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">bool</span>
  
====GroupRule_getRuleById====
+
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">If the group rule includes deleted users</span>
  
Get a group rule object by its id. If no rule is found with that id, empty will be returned.
+
|- align="left" valign="top"
 +
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">GROUPRULE_INCLUDE_DISABLED</span>
  
'''Syntax'''
+
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">bool</span>
  
GroupRule_getRuleById(''ruleId'')
+
| width="292" style="border:1px solid #010101;" |
 +
<span class="normalise">If the group rule includes disabled users</span>
  
'''Arguments'''
+
|}
  
* ''ruleId'': is a ''number ''expression. It is the group rule's id, which can be found in the group's Rule tab
+
Example
  
[[Image:6257.jpg]]
+
array rule = GroupRule_getRuleById(101919);
  
'''Return value'''
+
rule[GROUPRULE_TARGET] = GROUPRULE_TARGET_UNLIMITED;
  
An ''array'', it is the group rule object, which has following items
+
GroupRule_save(rule);  
[GROUPRULE_TARGET] = GROUPRULE_TARGET_UNLIMITED;''
 
  
''GroupRule_save(rule);''
+
<br> '''Availability'''  
  
'''Availability'''
+
Version 5.6
  
Version 5.6
+
[[Category:Group_Functions]]
__NOTOC__
 
<!-- imported from file: 6256.htm-->
 

Latest revision as of 10:14, 27 December 2011



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

6257.jpg

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