Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
documentation:2.1:extendedfunctions [2019/11/22 19:00]
maxbes
documentation:2.1:extendedfunctions [2020/04/16 15:13] (current)
maxbes
Line 27: Line 27:
     * [[#​groupMatch|groupMatch]]     * [[#​groupMatch|groupMatch]]
     * [[#​listMatch|listMatch]]     * [[#​listMatch|listMatch]]
 +    * [[#​inGroup|inGroup]]
     * [[#​encrypt|encrypt]]     * [[#​encrypt|encrypt]]
     * [[#​token|token]]     * [[#​token|token]]
     * [[#​isInNet6|isInNet6]]     * [[#​isInNet6|isInNet6]]
 +    * [[#​varIsInUri|varIsInUri]]
  
 <note tip>To know more about the jail, check [[http://​perldoc.perl.org/​Safe.html|Safe module documentation]].</​note>​ <note tip>To know more about the jail, check [[http://​perldoc.perl.org/​Safe.html|Safe module documentation]].</​note>​
Line 181: Line 183:
  
 The function returns 1 if the value was found, and 0 if it was not found. The function returns 1 if the value was found, and 0 if it was not found.
 +
 +==== inGroup ====
 +
 +
 +This function lets you test if the user is in a given group. It is case-insensitive.
 +
 +Usage example:
 +<​code>​
 +inGroup('​admins'​)
 +
 +inGroup('​test users'​)
 +</​code>​
 +
 +The function returns 1 if the user belongs to the given group, and 0 if they don't.
  
 ==== encrypt ==== ==== encrypt ====