3.) Global Variables
This section explains the global variables, which are available to all third party scripts, regardless of the action which was performed.


3.1 The %PROFILE hash

With every action, the %PROFILE hash will be available to the third party script. This hash will contain the member's profile, which the action is being executed against. For example, if a member is being created or deleted, the hash will contain the profile of the member being created / deleted.

The only keys in the %PROFILE hash will be the fields of the member database, and the values being the member's personal profile. For example, if you wanted the member's username, you would use the $PROFILE{'username'} variable, or if you wanted the member's ID#, you would use the $PROFILE{'id'} variable.

Please note, all keys of the hash are in lower case, and all spaces in the database fields are replaced with underscores "_". For example, in order to retrieve the "First Name" of a member, you would use the $PROFILE{'first_name'} variable.


3.2 The %EXTRA hash

The %EXTRA hash will also be available to all third party scripts executed, regardless of the action. This hash contains additional information on the member, such as the status, member type, and default program structure. The below table describes all variables available within the %EXTRA hash.

Variable
Name
Description
$EXTRA{'status'}
Member status
A one digit number, representing the status of the member. Will be one of the following:
  • 1 - Active
  • 2 - Inactive
  • 4 - Pending
$EXTRA{'sponsor'}
Placement sponsor
The ID# of the member's placement sponsor
$EXTRA{'program'}
Default program structure
A number, representing the ID# of the default program structure the member is currently in. You can see the ID# of all program structures through the Setup->Program Settings menu of the Admin Control Panel.
$EXTRA{'member_type'}
Member type
A number, representing the ID# of the member type, the member is currently assigned. You may see the ID# of all member types through the Setup->Member Settings menu.
$EXTRA{'balance'}
Account balance
The current balance of the member's transaction account.
$EXTRA{'reg_ip'}
Registration IP
The IP address used when the member first joined. Default to 0 if created by the administrator.
$EXTRA{'join_date'}
Date joined
The date the member was added to the database. Formatted in YYYY-MM-DD.
$EXTRA{'join_time'}
Time joined
The exact time the member was added to the database. Formatted in HH:MM:DD.