Re: find out group-membership with php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You need to get a little inventive here.

.htaccess:
SetEnv dir_groups "system|managers|sales" # pipe delimited


something.php:
<?php
$dir_groups = explode ( "|" , $_SERVER[ 'dir_groups' ] ) ;
die ( "<pre>" . print_r ( $dir_groups , true ) . "</pre>" ) ;
?>


browser result:
Array
(
    [0] => system
    [1] => managers
    [2] => sales
)

//Brad


On Sep 15, 2008, at 11:18 AM, André Warnier wrote:

Bradley Giesbrecht wrote:
Looks like you could add something like this to your .htaccess:
SetEnv dir_group "group_name"
That would work, but only if "group_name" is the only group that could have access to that directory. If there are several groups, then it does not work anymore, because you set them all to "group_name", and you lose the distinction.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
 "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux