GetUserLoginName
Description
Returns the HCL Compass user name (for example, mycqname) stored in the database and required for most HCL Compass functions, such as queries. When using LDAP authentication, the HCL Compass user name may not be the actual login name. For LDAP authentication, the GetUserLoginName method returns the HCL Compass 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@hcl.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 HCL Compass
admin session
$adminSession= CQAdminSession::Build();
#Logon as admin $adminSession->Logon("admin","admin","");
#Get the user "Dev" object
$userLogin = $adminSession->GetUserLoginName();
#...
CQAdminSession::Unbuild($adminSession);