User Object

You can access the User object to retrieve the user name of the current user and to check whether the user belongs to a particular user group. You can retrieve or modify the first and last name of the user.

For example, to have a message box open when the user has project administrator permissions, use the following code:

If User.IsInGroup("TDAdmin") Then
        MsgBox "The user " & User.FullName & _
        " has administrative permissions for this project."
End If

For details, see Example: Changing a Field Based on the User Group, and Example: Controlling User Permissions.

To access user properties that cannot be accessed by the User object, you can use the TDConnection object of the ALM open test architecture (OTA).

The User object has the following properties:

Property

R/W

Type

Description

FullName

R/W

String

Sets or retrieves the first and last name of the current user.

IsInGroup (GroupName)

R

Boolean

Checks whether or not the current user is a member of a predefined/user-defined group.

UserName

R

String

Returns the user name used when logging in to ALM.