
error when checking for NT group membership
Try this:
.....
'Retrieve User Info
Set objUser = GetObject(strPath)
' Retrieve the Groups this user belongs too
REM Set objUserGroups = objUser.Groups() *******error here********
' Set Session Variables to use later for determing what to display
REM For Each Group in objUserGroups
For Each Group in objUser.Groups
If Group.Name = "solomon_reports" Then
test = "yes"
exit for
End If
Next
.....
--
Michael Harris
MVP Scripting
I'm checking NT group member ship in an ASP application with the following
code:
If Request.ServerVariables("AUTH_USER") <> "" Then
strUserID1 = UCase(Request.ServerVariables("AUTH_USER"))
strUserID1 = Replace(strUserID1, "\", "/")
strPath = "WinNT://" & strUserID1
'Retrieve User Info
Set objUser = GetObject(strPath)
' Retrieve the Groups this user belongs too
Set objUserGroups = objUser.Groups() *******error here********
' Set Session Variables to use later for determing what to display
For Each Group in objUserGroups
If Group.Name = "solomon_reports" Then
test = "yes"
exit for
End If
Next
End If
I'm getting the following error:
"Object doesn't support this property or method: 'objUser.Groups' "
ADSI has been installed on the server (NT 4 sp5).
Can anyone help?
Walter