bugfix
[squirrelmail.git] / plugins / administrator / options.php
index 55e5da07a3d1918082033b09487fc75a1a10ea87..3d045bec5d76969e2e19742d0c459cc1346ee68a 100644 (file)
@@ -136,18 +136,11 @@ require_once('../functions/page_header.php');
 require_once('../functions/imap.php');
 require_once('../src/load_prefs.php');
 require_once('../plugins/administrator/defines.php');
+require_once('../plugins/administrator/auth.php');
 
 GLOBAL $data_dir, $username;
 
-$auth = FALSE;
-if ( $adm_id = fileowner('../config/config.php') ) {
-    $adm = posix_getpwuid( $adm_id );
-    if ( $username == $adm['name'] ) {
-        $auth = TRUE;
-    }
-}
-
-if ( !auth ) {
+if ( !adm_check_user() ) {
     header("Location: ../../src/options.php") ;
     exit;
 }