Mendix Client 4 API Documentation


mendix.sys.Session

mendix.sys.Session gives access to the user’s session.

Methods

getUserObject()

This method is called to retrieve the MxObject for the currently logged in user. It is an instance of System.User or one of its subclasses (if any).

Returns

Type Description
MxObject The data for the currently logged in user.

isGuest()

This method is called to determine if this is an anonymous session.

Returns

Type Description
Boolean true if the current user is Anonymous.

getUserId()

This method returns the current user’s GUID.

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).

Returns

Type Description
String The entity of the current user.

getUserName()

This method returns the Name attribute of the current user.

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 The attribute to retrieve.

Returns

Type Description
Any The value of the passed attribute (if any).

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.

shutdown()

This method is called to shutdown the subsystem.

isLoaded()

This method is called to check whether the subsystem has been started.

Returns

Type Description
Boolean true if the subsystem has been started.