X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fauth.php;h=8cddd0024bde4860ca5deb4a99115fbdde26b3a0;hb=e91e6548a0c119d9c1c7b5f3f44f806c7a98dce4;hp=fec8c1b342aa86c06d2c5062a3fae81ebced2191;hpb=245a6892bf5c780904ef9677f24d624ea17e0749;p=squirrelmail.git diff --git a/functions/auth.php b/functions/auth.php index fec8c1b3..8cddd002 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -8,16 +8,26 @@ ** $Id$ **/ - $auth_php = true; - + if (defined ('auth_php')) + return; + define ('auth_php', true); + function is_logged_in () { - if (!session_is_registered("user_is_logged_in")) { - echo _("You must login first."); - echo "\n\n"; - exit; - } else { - return true; - } + global $squirrelmail_language; + + if (session_is_registered('user_is_logged_in')) + return; + + set_up_language($squirrelmail_language, true); + + echo "\n"; + echo "

"; + echo "
"; + echo ""._("You must be logged in to access this page.")."
"; + echo ""._("Go to the login page")."\n"; + echo "
"; + echo "\n"; + exit; } ?>