some code simplification
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 3 Aug 2006 16:06:47 +0000 (16:06 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 3 Aug 2006 16:06:47 +0000 (16:06 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11463 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/auth.php

index 53034f63cdb8e737f28c2593ee4362288844de97..7de4fe94abc9d84603f34d1249cd845efb0333dd 100644 (file)
@@ -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
 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;
 }
 
 /**