Users module. Users are described in detail in Users article.

Methods

getAttributeName (name:String, lang:String):String

Returns user attribute localized name.

Parameters:

name

Attribute string ID.

lang

User language.

Returns:

Attribute localized name. Returns an empty string, if the attribute type is not found.

getLocalServerID (id:Int):Int

Returns the local ID of the game server that the given user is on.

Parameters:

id

User ID.

Returns:

Local slave server ID, if the user is currently logged in. -1 otherwise (since local server IDs start with 0).

getServerID (id:Int):Int

Returns the global ID of the game server that the given user is on.

Parameters:

id

User ID.

Returns:

Global slave server ID, if the user is currently logged in. 0 otherwise.

getUID (name:String):Int

Returns user ID from his name.

Parameters:

name

User name.

Returns:

User ID, if such user exists in database. 0 otherwise.

getUIDbyNetworkID (networkType:String, networkID:String):Int

Returns user ID by his SNS ID and type (NetworkID, NetworkType database fields).

Parameters:

networkType

User SNS type.

networkID

User SNS ID.

Returns:

User ID, if such user exists in database. 0 otherwise.

getVariableName (name:String, lang:String):String

Returns user variable localized name.

Parameters:

name

Variable string ID.

lang

User language.

Returns:

Variable localized name. Returns an empty string, if the variable type is not found.

userExists (id:Int):Bool

Returns whether the database record for this user exist.

Parameters:

id

User ID.

Returns:

True, if the record exists in database. False otherwise.