IBM Worklight v5.0.5 > API reference > IBM Worklight client-side API > JavaScript client-side API

WL.Client.getUserName

Return the user name of the user who is currently logged in, as defined by the login module used to authenticate the user. Only applicable to applications that support login.

Parameter Description
realm Optional. The name of a realm defined in authenticationConfig.xml. The realm must be a Facebook realm.

If not specified, the method returns the user name in the resource realm assigned to the application when it was deployed.


Return Value

The user name of the user who is currently logged in, or NULL if the user name is unknown.


Parent JavaScript client-side API





+

Search Tips   |   Advanced Search