This function is used in Python Scripting.

Description

Returns the currently logged-in username.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.security.getUsername()

  • Parameters

Nothing

  • Returns

String - The current user name.

  • Scope

Vision Client

Code Examples
Code Snippet
# This code runs on a startup script and does special logic based upon who was logging in.
name = system.security.getUsername()
if name == 'Bob':
   system.nav.openWindow("BobsHomepage")
else:
   system.nav.openWindow("NormalHomepage")
Keywords

system security getUsername, security.getUsername