Added auth on file method
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 31 Jan 2002 10:52:52 +0000 (10:52 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 31 Jan 2002 10:52:52 +0000 (10:52 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2310 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/administrator/.cvsignore [new file with mode: 0644]
plugins/administrator/auth.php

diff --git a/plugins/administrator/.cvsignore b/plugins/administrator/.cvsignore
new file mode 100644 (file)
index 0000000..9380a69
--- /dev/null
@@ -0,0 +1 @@
+admins
index eb6bd74..aab2196 100644 (file)
@@ -5,7 +5,11 @@ function adm_check_user() {
     GLOBAL $username;
 
     $auth = FALSE;
-    if ( $adm_id = fileowner('../config/config.php') ) {
+    
+    if ( file_exists( '../plugins/administrator/admins' ) ) {
+        $auths = file( '../plugins/administrator/admins' );
+        $auth = in_array( $username, $auths );
+    }else if ( $adm_id = fileowner('../config/config.php') ) {
         $adm = posix_getpwuid( $adm_id );
         if ( $username == $adm['name'] ) {
             $auth = TRUE;