Equinox Online Help - Language Reference - A to Z
SetUserContext |
|
---|---|
Applies to | |
Syntax | SetUserContext [LoginName, flags] |
Action | [Statement] Changes the login and associated data in the local process. |
Scope | Usable anywhere. |
Notes | This statement obtains a password from the operator if required, and changes the login details to that of LoginName. It loads appropriate permissions for that user, and optionally local workarea values. The LoginName parameter is a string containing the login name, or "" for the Default User Login. If the parameter is omitted, Equinox returns the login state to that of the operator's first login. The flags parameter may take the following values; add the values together to combine them.
If LoginName has more permissions than the current user, the ask for password flag is set. If the ask for password flag is set in a remote process, the statement returns an error; the flag has no effect in a web page. This statement cannot be used to load the System Supervisor context. |
Category | User, groups and ESS |
See Also | Execute, ExecuteSetMode, SetUserGroup |
Example | This example sets the user context for user Jack Beanstalk, runs a report, then resets the user context back to the default again: SetUserContext "JB" This example gets Jack's current status as stored in a local workarea for his user login, and preserves local workareas for the current user. string vsStatus |