GetAuthenticationMode

설명

사용자의 현재 AuthenticationMode를 리턴합니다.

이 메소드를 호출할 때는 특별한 권한이 필요하지 않습니다.

참고: 이 메소드는 버전 2003.06.14부터 사용 가능해졌습니다.

구문

VBScript

user.GetAuthenticationMode()  

Perl

user->GetAuthenticationMode(); 
ID
설명
user
User 오브젝트입니다.
Return value
사용자의 AuthenticationMode가 포함된 Long을 리턴하고 그렇지 않은 경우 예외가 발생합니다.

예제

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 	 ' the user authentication mode 
	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";
	}

피드백