PROCEDURE verifyIfUserExists(tcUserID) >>LOCAL lcUserId >>lcUserId ='CN='+tcUserID >>objRootLDAP = Getobject("LDAP://RootDSE") >>strDNSDomain = objRootLDAP.Get("DefaultNamingContext") && Get the context >>strGroup = "CN=oeb-test," >>strOU = "OU=Test,OU=OEB,OU=SAAS-users," && You correct specifications >>*' Prepare the OU and the Group >>objGroup = Getobject("LDAP://"+ strGroup + strOU + strDNSDomain) >>objOU =Getobject("LDAP://" +strOU + strDNSDomain) >> >>For Each objUser In objOU >> If objUser.Class = Lower("User") >> IF objUser.name = lcUserId >> RETURN .T. >> ENDIF >> ENDIF >>Endfor >>RETURN .F. >> >>ENDPROC>
>RootDSE >"CN=oeb-test," >"DefaultNamingContext" >>