set default download link to absolute_dl = true to force download instead of
[squirrelmail.git] / functions / auth.php
1 <?php
2
3 /**
4 * auth.php
5 *
6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
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
14 function is_logged_in() {
15
16 if ( sqsession_is_registered('user_is_logged_in') ) {
17 return;
18 } else {
19 global $PHP_SELF, $session_expired_post,
20 $session_expired_location;
21
22 /* First we store some information in the new session to prevent
23 * information-loss.
24 */
25
26 $session_expired_post = $_POST;
27 $session_expired_location = $PHP_SELF;
28 if (!sqsession_is_registered('session_expired_post')) {
29 sqsession_register($session_expired_post,'session_expired_post');
30 }
31 if (!sqsession_is_registered('session_expired_location')) {
32 sqsession_register($session_expired_location,'session_expired_location');
33 }
34 include_once( '../functions/display_messages.php' );
35 logout_error( _("You must be logged in to access this page.") );
36 exit;
37 }
38 }
39
40 ?>