Skip to content
🚀 Rapid Application Development with the App Builder

app.getUsername()

Returns the username of the currently logged-in user. Returns anonymous if the user is not logged in.

Scope: GLOBAL

Parameters

None

Return Value

TypeDescription
stringUsername of the currently logged-in user or anonymous.

✨ Example

js
if (app.getUsername().toLowerCase() === "john") {
    wpda.alert("Welcome", "Welcome John!)
}