fixes for the admin plugin for 1.4.0 RC1
[squirrelmail.git] / plugins / administrator / auth.php
index 4026aaf666a87bd1f0d42631288262d988ebdc80..58350fa9614b22f09e9789e9da7a9999bc5e82fd 100644 (file)
  */
 
 function adm_check_user() {
-    GLOBAL $username, $PHP_SELF;
-
+    global $PHP_SELF;
+    
+    $username = ( !isset($_SESSION['username']) ? '' : $_SESSION['username'] );
+    /* This needs to be first, for all non_options pages */
     if (strpos('options.php', $PHP_SELF)) {
         $auth = FALSE;
     } else if (file_exists(SM_PATH . 'plugins/administrator/admins')) {