Remove weird duplicate
[squirrelmail.git] / functions / auth.php
CommitLineData
3c13b9fb 1<?php
2
35586184 3/**
4 * auth.php
5 *
15e6162e 6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
35586184 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Contains functions used to do authentication.
10 *
11 * $Id$
12 */
13
9be8198d 14function is_logged_in() {
2d367c68 15
d7c82551 16 if ( sqsession_is_registered('user_is_logged_in') ) {
e110c214 17 return;
4d2c9f70 18 } else {
8a48b083 19 global $PHP_SELF, $session_expired_post,
f04cab07 20 $session_expired_location;
21
22 /* First we store some information in the new session to prevent
23 * information-loss.
24 */
8a48b083 25
26 $session_expired_post = $_POST;
f04cab07 27 $session_expired_location = $PHP_SELF;
d7c82551 28 if (!sqsession_is_registered('session_expired_post')) {
8a48b083 29 sqsession_register($session_expired_post,'session_expired_post');
f04cab07 30 }
d7c82551 31 if (!sqsession_is_registered('session_expired_location')) {
8a48b083 32 sqsession_register($session_expired_location,'session_expired_location');
f04cab07 33 }
9be8198d 34 include_once( '../functions/display_messages.php' );
35 logout_error( _("You must be logged in to access this page.") );
4d2c9f70 36 exit;
e110c214 37 }
e110c214 38}
3c13b9fb 39
d7c82551 40?>