6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * Contains functions used to do authentication.
14 function is_logged_in() {
16 if ( session_is_registered('user_is_logged_in') ) {
19 global $HTTP_POST_VARS, $PHP_SELF, $session_expired_post,
20 $session_expired_location;
22 /* First we store some information in the new session to prevent
25 $session_expired_post = $HTTP_POST_VARS;
26 $session_expired_location = $PHP_SELF;
27 if (!session_is_registered('session_expired_post')) {
28 session_register('session_expired_post');
30 if (!session_is_registered('session_expired_location')) {
31 session_register('session_expired_location');
33 include_once( '../functions/display_messages.php' );
34 logout_error( _("You must be logged in to access this page.") );