Skip to content

script.getUserName ​

Returns the name of the user running the process, or of another user.

js
script.getUserName(userId)

Parameters ​

ParameterTypeDescription
userIdnumberOptional. A user's id, to get that user's name instead.

Returns ​

string

The user's name.

Examples ​

js
const userName = script.getUserName();