The pjs.getUser() API returns the NodeRun or IBM i user name.
This API was added in Profound.js 4.9.0
Parameters
None
Return Value
The NodeRun or IBM i user name, if signed in, otherwise the return value is null.
- If the NodeRun workspace is called from IBM i using the NODERUN command, then the IBM i user name is returned.
- If used in a Profound.js instance that is configured to access Connector APIs on a remote IBM i instance, then the IBM i user name is returned.
- If the Profound.js instance is running on IBM i and the module is run using profoundjs.express(), then the user name will not be available until after the first API call that accesses IBM i data/objects due to delayed log in.
var user = pjs.getUser();