Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 9th, 2006, 05:51 AM
Authorized User
 
Join Date: Jun 2005
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Active Directory Information

Hi there,

I've developed an Intranet which allows users to access their documents over https:// connections, and i've got the following code, which checks their AD group membership and sets a base directory to connect to their home folder. I want to be a little cleverer though, and not check group membership, but check their 'Department' information on the 'Organisation' tab of the AD user properties.

Can anyone help?

Thanks very much/...

Code:
<%
    set strUserData = Server.CreateObject("ADSystemInfo")
    set strUserInfo = getObject ("LDAP://" & strUserData.Username)
        For Each Group in strUserInfo.Groups
            If Group.cn = "AYL Administrators" Then
                strBaseDir = "staff/administrators"
            End If
            If Group.cn = "AYL Associate Staff" Then
                strBaseDir = "staff/associate"
            End If
            If Group.cn = "AYL Teaching Staff" Then
                strBaseDir = "staff/teachers"
            End If
        Next
%>




Similar Threads
Thread Thread Starter Forum Replies Last Post
About Active Directory apalmero VB How-To 1 April 8th, 2005 04:06 PM
Secirity information goes when directory moved Quixote Access VBA 4 March 9th, 2005 10:33 AM
Active Directory - help! bubmachine General .NET 2 August 3rd, 2004 04:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.