Skip to main content
Version: 8.1

system.user.getUser

This function is used in Python Scripting.

Description​

Looks up a specific user in a user source, by username. The full User object is returned except for the user's password.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.user.getUser(userSource, username)

Parameters​

TypeParameterDescription
StringuserSourceThe name of the user source to search for the user in. Can be a blank string to use the Vision Client's default user source.
StringusernameThe username of the user to search for.

Returns​

User - The user, as a User object.

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Example #1
# This example will print the first and last name of the current user using the default datasource:
userName = system.security.getUsername()
user = system.user.getUser("", userName)
print user.get('firstname') + " " + user.get('lastname')