isExec
(/rs/public/functions.access.php)
isExec -- Checks if member is an executive.
Description
bool isExec
($pin, $execArray = NULL)
This function checks a member's id against the entire executive roster, or part of it.
$pin is the id of the member to be checked.
If $execArray is specified, only the positions included in the array are checked. $execArray is an array of position abbreviations as strings.
For example, to check if a member is the fleet commander, you should set $execArray = array ("fc"). If an empty array is sent, the function will always return false.
Any datatype other than array for $execArray will be ignored. Anything not an executive abbreviation in $execArray will be ignored. Omit this parameter to check the entire executive roster.
This function returns true if the member is an executive and meets the optional criteria in $execArray, and false otherwise. This function returns false on failure.
Examples
isExec (1) ; /* Returns true if member with id 1 is an executive. Returns false otherwise. */
isExec (2, "io") /* Returns true if member with id 2 is an executive. Returns false otherwise. */
isExec (3, array ("IO")) /* Returns true if member with id 3 is the Internet Officer. */
Related Functions
isFCS
Dependencies
None.
Function Index
|