Namespace

session

mx.session

Access to the user’s session.

Methods

# static getUserId() → {GUID}

Gets the current user’s GUID.

GUID of the current user

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

# static getUserName() → {string}

Gets the Name attribute of the current user.

Name attribute of the current user

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

# static getUserRoleNames() → {Array.<string>}

Gets names of the current user’s roles.

names of the current user's roles.

Array.<string>

# static isGuest() → {boolean}

Determines if this is an anonymous session.

true if the current user is anonymous, false otherwise

boolean