I have written an intranet application that needs to be used by different
types of users. However, I want to prevent some users from changing the data
in the database. The server providing this application is running PHP 4.2 on
IIS5. I would like to capture the error message cleanly and present a "You
are not authorized to view this page" message based on Windows NT user ID or
group membership. I use ADSI for other tasks and it is an obvious choice
here as well. I just can't seem to get it to work properly.

Here is a sample of what I am trying just to prove it can work:
<?php
    $objDomain = new COM("WinNT://DomainName") or die("Cannot get DomainName
object");
    $objDomain->filter = array("group");
    foreach($objDomain as $group){
        print $group->name."<br>\n";
    }
    print "\nDomainName Group enum complete<br>\n";
?>

The output of this script is just the final print statement. It appears to
get the object fine.

Any help would be appreciated.

Bill

--
"It is not what name others call you that matters,
but what name you respond to that truly determines
who you are." - Old Swahili saying




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to