getUserName()
Returns the display name of the currently logged user account.
Syntax
Copy
getUserName(): string
Result
Returns the display name of the currently logged user account.
Examples
In this example:
- We query the systemuser entity for the currently logged user account (see getUserId()).
- We use the user's display name and we extract the email attribute from the query result (see ebs.getByIdAsync) to display the message.
Copy
ebs.getByIdAsync('systemuser', getUserId())
.then(function(result) {
console.log(getUserName() + ' (' + result.email + ') was here.', 'info')})
The resulting browser console output will have the following form:
Administrator (host@change.me) was here.