/[docman]/htusers_union.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /htusers_union.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Wed Sep 26 14:43:35 2001 UTC (22 years, 6 months ago) by dpavlin
Branch: MAIN
htusers_union can be used to auth users using more than one method (e.g.
first try by http headers, then from file and at the end from SQL database)

1 dpavlin 1.1 <?
2    
3     /*
4     Document manager handling for union of different htuser auth
5     methods.
6    
7     Use $htusers_union[] in docman.conf to specify which methods
8     to use and in which order.
9    
10     */
11    
12     global $PHP_AUTH_USER,$PHP_AUTH_PW,$gblPw;
13    
14     $try_more=1;
15    
16     while($this = array_shift($htusers_union)) {
17     if (file_exists("$gblIncDir/$this.php")) {
18     include("$gblIncDir/$this.php");
19     $tmp=md5($PHP_AUTH_USER.$PHP_AUTH_PW);
20     if ($tmp == $gblPw) {
21     error_log("user: $PHP_AUTH_USER pw: $PHP_AUTH_PW authed using $this",0);
22     break;
23     } else {
24     error_log("user: $PHP_AUTH_USER not authed using $this",0);
25     }
26     }
27     }
28    
29     ?>

  ViewVC Help
Powered by ViewVC 1.1.26