X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fauth.php;h=8cddd0024bde4860ca5deb4a99115fbdde26b3a0;hb=e91e6548a0c119d9c1c7b5f3f44f806c7a98dce4;hp=f302a496e021bdb2ddb3f6d2d23f25a1489a0c23;hpb=b9bfd165b055eac4f5e62438ae78eaab01cbb90e;p=squirrelmail.git diff --git a/functions/auth.php b/functions/auth.php index f302a496..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; } ?>