User2.LoginName Property

Definition

Gets the user's full credentials.

public:
 property System::String ^ LoginName { System::String ^ get(); };
public string LoginName { get; }
member this.LoginName : string
Public ReadOnly Property LoginName As String

Property Value

The user's credentials as domain\username.

Examples

In the following example, the LoginName property is used to display the current user's login credentials.

User2 thisUser = thisApplication.User;
thisXDocument.UI.Alert(thisUser.LoginName);
Dim thisUser As User2  = thisApplication.User
thisXDocument.UI.Alert(thisUser.LoginName)

Remarks

The LoginName property returns a user's credentials as domain\username. If the user's account does not belong to a domain, the property returns only username.

This is equivalent to calling System.Environment.UserDomainName+"\\"+System.Environment.UserName.

Applies to