USER Methods

status()

Request or set a user's status. If the method is used to set the status, values can range from 1=ACTIVE to 4=LOCKED. In case the status is requested the function will return zero if the user does not exist.

int status([ int index [, int status ]])

Return

User's status

Parameter
Description
indexThe backend's user-index. If no index is passed the current user's status will be returned.
statusThe status to be set. If no status is passed the function will return the user-status. This can be one of the following values:

0 = user does not exist
1 = ACTIVE
2 = PAUSED
3 = REGISTERED
4 = LOCKED

Get current user's status

$USER->status()
RETURN: 1

Get any user's status

$USER->status(8)
RETURN: 4

Activate user

$USER->status(8, 1)
RETURN: 1