From b3e6168d4f84187dc1a8ca30409102346ac1cd13 Mon Sep 17 00:00:00 2001 From: fidian Date: Fri, 23 Nov 2001 15:01:18 +0000 Subject: [PATCH] Modified sqimap_session_id to return something when there is no session ID yet. This lets it work with the login_auth plugin. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1792 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index 165a02a5..b5576283 100755 --- a/functions/imap_general.php +++ b/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; } -- 2.25.1