GetAuthenticationMode

Description

Devuelve el AuthenticationMode actual del usuario.

Para llamar a este método, no se necesita ningún privilegio especial.

Nota: Este método estuvo disponible en la versión de 2003.06.14.

Sintaxis

VBScript

user.GetAuthenticationMode()  

Perl

user->GetAuthenticationMode(); 
Identificador
Description
user
Un objeto User.
Valor de retorno
Devuelve un valor Long que contiene el AuthenticationMode del usuario, o si no lanza una excepción.

Ejemplos

VBScript

Public Function checkAuthentication_On_User(ByVal theUser As OAdUser)
	' Check the user's authentication mode   
	Const AD_LDAP_AUTHENTICATION = 1
	Const AD_CQ_AUTHENTICATION = 2
	Dim authentication 	 ' la modalidad de autenticación de usuario 
	authentication = user.GetAuthenticationMode
	if authentication = AD_LDAP_AUTHENTICATION then
		checkAuthentication_On_User =  "LDAP Authenticated"
	elseif authentication = AD_CQ_AUTHENTICATION then
		checkAuthentication_On_User =  "CQ Authenticated"
	elseif authentication = 0 then
		checkAuthentication_On_User =  "CQ Authenticated"
	else
		checkAuthentication_On_User = "UNKNOWN"
	end if
end Function

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";
	}

Comentarios