User object

You can use 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.

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 or user-defined group.

UserName

R

String

Returns the user name used when logging in to ALM.

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

Copy code
if (User.IsInGroup === "TDAdmin") {
    MsgBox('The user has administrative permissions for this project.');
}

Note: For user properties that cannot be retrieved by the User object, you can use the TDConnection object.

Back to top