GetUserLoginName

Description

Returns the Rational® ClearQuest® user name (for example, mycqname) stored in the database and required for most Rational® ClearQuest® functions, such as queries. When using LDAP authentication, the Rational® ClearQuest® user name may not be the actual login name. For LDAP authentication, the GetUserLoginName method returns the Rational® ClearQuest® user name (Name field of the User object) and not the login name (that is, the LDAP identifier that is used to log in, for example, myuniquename@ibm.com) used to connect to the database.

Note: This method became available in version 2003.06.14.

Syntax

VBScript


adminSession.GetUserLoginName 

Perl


$adminSession->GetUserLoginName(); 
Identifier
Description
adminSession
The AdminSession object representing the current schema repository access session.
Return value
A String containing the login name (such as jjones) of the user who is logged in for this AdminSession.

Examples

VBScript

set adminSession = CreateObject("ClearQuest.AdminSession") 
adminSession.Logon "admin", "admin", "" 
userLogin = adminSession.GetUserLoginName
' ...

Perl

use CQPerlExt; 
#Create a Rational®
                    ClearQuest®
 admin session 
$adminSession= CQAdminSession::Build(); 
#Logon as admin $adminSession->Logon("admin","admin",""); 
#Get the user "Dev" object 
$userLogin = $adminSession->GetUserLoginName(); 
#... 
CQAdminSession::Unbuild($adminSession);