Namespace: session

mx. session

Access to the user’s session.

Methods

(static) getUserAttribute(attr) → {*}

Gets the value of the passed attribute of the current user.

Parameters:
Name Type Description
attr string

attribute to retrieve

Returns:

value of the passed attribute

Type
*
Example
mx.session.getUserAttribute("Blocked");    // false

(static) getUserClass() → {string}

Gets the entity of the current user (System.User or a subclass).

Returns:

entity of the current user

Type
string
Example
mx.session.getUserClass(); // "System.User"

(static) getUserId() → {GUID}

Gets the current user’s GUID.

Returns:

GUID of the current user

Type
GUID
Example
mx.session.getUserId(); // "2533274790395905"

(static) getUserName() → {string}

Gets the Name attribute of the current user.

Returns:

Name attribute of the current user

Type
string
Example
mx.session.getUserName(); // "MxAdmin"

(static) isGuest() → {boolean}

Determines if this is an anonymous session.

Returns:

true if the current user is anonymous, false otherwise

Type
boolean