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 eb6bd740c2641e2e67239671be107827859be3dd..aab2196d774d52ac3754da507506f6363473d344 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;