From cffbdf90421ea9ad911b7d01a458ba26c8c0fb11 Mon Sep 17 00:00:00 2001 From: kink Date: Thu, 3 Aug 2006 16:06:47 +0000 Subject: [PATCH] some code simplification git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11463 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/auth.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/functions/auth.php b/functions/auth.php index 53034f63..7de4fe94 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -17,7 +17,7 @@ /** - * Detect logged user + * Detect whether user is logged in * * Function is similar to is_logged_in() function. If user is logged in, function * returns true. If user is not logged in or session is expired, function saves $_POST @@ -32,23 +32,23 @@ function sqauth_is_logged_in() { if ( sqsession_is_registered('user_is_logged_in') ) { return true; - } else { - // First we store some information in the new session to prevent - // information-loss. - sqGetGlobalVar('PHP_SELF', $PHP_SELF, SQ_SERVER); + } - $session_expired_post = $_POST; - $session_expired_location = $PHP_SELF; - if (!sqsession_is_registered('session_expired_post')) { - sqsession_register($session_expired_post,'session_expired_post'); - } - if (!sqsession_is_registered('session_expired_location')) { - sqsession_register($session_expired_location,'session_expired_location'); - } - session_write_close(); + // First we store some information in the new session to prevent + // information-loss. + sqGetGlobalVar('PHP_SELF', $PHP_SELF, SQ_SERVER); + + $session_expired_post = $_POST; + $session_expired_location = $PHP_SELF; + if (!sqsession_is_registered('session_expired_post')) { + sqsession_register($session_expired_post,'session_expired_post'); + } + if (!sqsession_is_registered('session_expired_location')) { + sqsession_register($session_expired_location,'session_expired_location'); + } + session_write_close(); - return false; - } + return false; } /** -- 2.25.1