replace $_SESSION with sqgetGlobalVar
[squirrelmail.git] / include / load_prefs.php
index a261e76bda7635af2eeba6e67eb3f144a1ac32c6..a94c0f57be0968d8d6010eb7caf5013a7738e9fd 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');
 
 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' );
 
 
 $custom_css = getPref($data_dir, $username, 'custom_css', 'none' );