inSquad

(/rs/public/functions.access.php)

inSquad -- Check if a member is in a squad.

Description

bool inSquad ($sq_id, $pin = 0)

This function checks to see if a member is on the roster for a certain squadron. The squadron id is passed via the argument $sq_id and is mandatory.

$pin is optional and will default to the logged-in member (RSID) if it is set to 0, which is the default.

This function returns true if $pin (RSID if ! $pin) is found in squadron $sq_id. It returns false otherwise, including returning false on other failures.

Examples

inSquad (1) /* Check if the logged-in member is in squad with id 1. */

inSquad (1, 2) /* Check is member with id 2 is in squad with id 1. */

inSquad (1, 0) /* Check if the logged-in member is in squad with id 1. */

Related Functions

None.

Dependencies

None.

Function Index