system.vision.getUsername
Backwards Compatibility
This function replaces system.security.getUsername. Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility.
This function is used in Python Scripting.
Descriptionβ
Returns the current username logged in.
Client Permission Restrictionsβ
This scripting function has no Client Permission restrictions.
Syntaxβ
system.vision.getUsername()
Parametersβ
Nothing
Returnsβ
String - The current username.
Scopeβ
Vision Client
Code Examplesβ
Example #1
# This code would run on a startup script based on who was logging in.
name = system.vision.getUsername()
if name == 'Bob':
system.vision.openWindow("BobsHomepage")
else:
system.vision.openWindow("NormalHomepage")