inWing

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

inWing -- Check if member is in a wing.

Description

bool inWing ($wID, $pin = 0)

This function checks to see if a member is on the roster for a certain wing. The wing id is passed via the argument $wID 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 wing $wID. It returns false otherwise, including returning false on other failures.

Examples

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

inWing (1, 2) /* Check is member with id 2 is in wing with id 1. */

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

Related Functions

None.

Dependencies

None.

Function Index