瀏覽代碼

replace $_SESSION with sqgetGlobalVar

Thijs Kinkhorst 22 年之前
父節點
當前提交
324a593bae
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      include/load_prefs.php

+ 3 - 1
include/load_prefs.php

@@ -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' );