Appearance
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
| Type | Description |
|---|---|
| string | Username of the currently logged-in user or anonymous. |
✨ Example
js
if (app.getUsername().toLowerCase() === "john") {
wpda.alert("Welcome", "Welcome John!)
}