replace $_SESSION with sqgetGlobalVar
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 11 Mar 2003 17:48:00 +0000 (17:48 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 11 Mar 2003 17:48:00 +0000 (17:48 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4646 7612ce4b-ef26-0410-bec9-ea0150e637f0

include/load_prefs.php

index a261e76..a94c0f5 100644 (file)
@@ -18,7 +18,9 @@ require_once(SM_PATH . 'functions/prefs.php');
 require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/constants.php');
 
-$username = ( !isset($_SESSION['username']) ? '' : $_SESSION['username'] );
+if( ! sqgetGlobalVar('username', $username, SQ_SESSION) ) {
+    $username = '';
+}
 
 $custom_css = getPref($data_dir, $username, 'custom_css', 'none' );