Browse Source

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 24 năm trước cách đây
mục cha
commit
495b22fb6f
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  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;
    }