ソースを参照

Modified sqimap_session_id to return something when there is no session ID
yet. This lets it work with the login_auth plugin.

Tyler Akins 23 年 前
コミット
495b22fb6f
1 ファイル変更9 行追加1 行削除
  1. 9 1
      functions/imap_general.php

+ 9 - 1
functions/imap_general.php

@@ -19,7 +19,15 @@ $imap_general_debug = false;
     ******************************************************************************/
 
    function sqimap_session_id() {
-      return( substr( session_id(), -4 ) );
+      if (session_id() != '')
+         return substr(session_id(), -4);
+	 
+      global $RememberedSessionID;
+      
+      if (! isset($RememberedSessionID))
+         $RememberedSessionID = GenerateRandomString(4, '', 7);
+	 
+      return $RememberedSessionID;
    }