GetAuthenticationMode
Description
Returns
the current AuthenticationMode of the User.
Note: A return value of
either 0 or 2 indicates CQ_AUTHENTICATION and should be handled as such in any
scripts using the DevOps Plan Schema
API.
No special privilege is required to call this method.
Syntax
Perl
user->GetAuthenticationMode();
- Identifier
- Description
- user
- A User object.
- Return value
- Returns a Long containing the AuthenticationMode of the user, else an exception is thrown.
Example
Perl
sub checkAuthentication_On_User($)
# Check the user's authentication mode
{
my $user = shift;
$authentication = $user->GetAuthenticationMode();
if ($authentication == $CQPerlExt::CQ_LDAP_AUTHENTICATION) {
return "LDAP Authenticated";
}
if ($authentication == $CQPerlExt::CQ_CQ_AUTHENTICATION) {
return "CQ Authenticated";
}
return "UNKNOWN";
}