getUserId()

Returns the associated ID for the specified user name.

Synopsis

unsigned getUserId([string name]);

Parameters

Parameter Description
name User name

Return value

Error

Description

Returns the associated ID for a specified user name. If no user of this name exists, 65535 will be returned. This value corresponds to the DEFAULT_USERID. If the function has been called without parameters, it will return the ID of the current user. It is defined by the first call of the function setUserId().

Each manager, except Data and Event Managers, starts by default with the User ID DEFAULT_USERID. This constant checks also the return value of the function getUserId().

CTRL constant Description
DEFAULT_USERID No user
main()
{
 getUserId("root")
}

Assignment

User administration

Availability

CTRL