mx.session
Methods
startup(callback)
This method is called to startup the subsystem.
Parameters
| Name | Type | Description |
|---|---|---|
| callback | Function | The function to be called when startup is finished. |
Returns
-
shutdown()
This method is called to shutdown the subsystem.
Parameters
-
Returns
-
isLoaded()
This method is called to check whether the subsystem has been started.
Parameters
-
Returns
| Type | Description |
|---|---|
| Boolean | true if the subsystem has been started. |
h3(#.getUserObject). .getUserObject()
This method is called to retrieve that MxObject for the currently logged in user. It is an instance of System.User or one of its subclasses (if any).
Parameters
- None
Returns
MxObject
isGuest()
This method is called to determine if this is an anonymous session.
Parameters
-
Returns
| Type | Description |
|---|---|
| Boolean | true if the current user is Anonymous. |
getUserId()
This method returns the current user’s GUID.
Parameters
-
Returns
| Type | Description |
|---|---|
| Number | The GUID of the current user. |
getUserClass()
This method returns the Entity of the current user (System.User or a subclass).
Parameters
-
Returns
| Type | Description |
|---|---|
| String | The entity of the current user. |
getUserName()
This method returns the Name attribute of the current user.
Parameters
-
Returns
| Type | Description |
|---|---|
| String | The Name attribute of the current user. |
getUserAttribute()
This method returns the value of the passed attribute of the current user.
Parameters
| Name | Type | Description |
|---|---|---|
| attr | String |
Returns
| Type | Description |
|---|---|
| Any | The value of the passed attribute (if any). |