squirrelmail/functions/auth.php
gustavf f6aa7e6f4a Added auth.php to put authentication functions in one place. Added a
function there to check if the user is logged in without having to
connect to the IMAP server. Using this function in compose.php as a
test.
2000-06-29 12:46:49 +00:00

22 lines
344 B
PHP

<?php
/**
** auth.php
**
** Contains functions used to do authentication.
**
**/
$auth_php = true;
function is_logged_in () {
if (!session_is_registered("user_is_logged_in")) {
echo _("You must login first.");
echo "</body></html>\n\n";
exit;
} else {
return true;
}
}
?>