GetAuthenticationLoginName
Description
Returns the string that a user enters as the login name when authenticating. The return value may be different from a HCL Compass user name if the user is LDAP authenticated.
Use the GetUserLoginName method to get the HCL Compass name of the user stored in the user profile record for the user.
Returns the login name used to create the AdminSession object. The value returned is the name used to authenticate the user, not the HCL Compass user login field name that is stored in the user profile record for the user. The return value may be a LDAP login name (for example, myname@us.hcl.com) and not a HCL Compass user name (for example, mycqname).
Syntax
VBScript
adminSession.GetAuthenticationLoginName
Perl
$adminSession->GetAuthenticationLoginName
();
- Identifier
- Description
- adminSession
- The AdminSession object representing the current schema repository access session.
- Return value
- A String containing the authentication name used to create this AdminSession.
Examples
VBScript
set adminSession = CreateObject("ClearQuest.AdminSession")
adminSession.Logon "admin", "admin", ""
userLogin = adminSession.GetAuthenticationLoginName
' ...
Perl
use CQPerlExt;
my ($admin_user_login, $admin_pwd, $dbset, $cqusername) = @_;
my $authusername = $admin_user_login;
my $adminSessionObj = CQAdminSession::Build();
$adminSessionObj->Logon($admin_user_login, $admin_pwd, $dbset);
my $loginname = $adminSessionObj->GetUserLoginName();
my $authloginname = $adminSessionObj->GetAuthenticationLoginName();
print "Admin login: $authusername , $authloginname , $cqusername, $loginname \n";
if ($loginname ne $cqusername)
{
print "Admin login $loginname != $cqusername!!\n";
}
if ($authloginname ne $authusername)
{
print "Admin authname $authloginname != $authusername!!\n";
}
CQAdminSession::Unbuild($adminSessionObj);