getUserName()

Returns the associated user name for a specified ID.

Synopsis

string getUserName( [unsigned id] );

Parameters

Parameter Description
id user ID

Return value

The function returns the user name or if no name has been assigned, "" (empty string).

Error

Description

Returns the associated ID for the specified user name. If no name has been assigned to the ID, an empty string will be returned. If the function has been called without parameters, it will return the user name of the current user. It is defined by the first call of the function setUserId(). If no name has been assigned to the current user, for example, because a user with this ID has not been created, an empty string will be returned.

Example

main()
{
 DebugN(getUserName(0)); // "Root"
}

Assignment

User administration

Availability

CTRL

See also