X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fauth.php;h=3ac8fc897b0919180dd5686217b666c6df30585f;hb=0c46707d33b0e134bc2edba3362b043b56e9b5e1;hp=ba8a6de1ec05b6ac0fced55142293000dbb806fe;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6;p=squirrelmail.git diff --git a/functions/auth.php b/functions/auth.php index ba8a6de1..3ac8fc89 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -11,40 +11,15 @@ * $Id$ */ -/*****************************************************************/ -/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/ -/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/ -/*** + Base level indent should begin at left margin, as ***/ -/*** the require_once below. ***/ -/*** + All identation should consist of four space blocks ***/ -/*** + Tab characters are evil. ***/ -/*** + all comments should use "slash-star ... star-slash" ***/ -/*** style -- no pound characters, no slash-slash style ***/ -/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/ -/*** ALWAYS USE { AND } CHARACTERS!!! ***/ -/*** + Please use ' instead of ", when possible. Note " ***/ -/*** should always be used in _( ) function calls. ***/ -/*** Thank you for your help making the SM code more readable. ***/ -/*****************************************************************/ +function is_logged_in() { -require_once( '../functions/page_header.php' ); - - function is_logged_in () { - global $squirrelmail_language; - - if ( session_is_registered('user_is_logged_in') ) - return; - - set_up_language($squirrelmail_language, true); - - displayHtmlHeader( 'SquirrelMail', '', FALSE ); - - echo "\n" . - '

'. - _("You must be logged in to access this page.").'

'. - ""._("Go to the login page")."\n". - "
\n"; + if ( session_is_registered('user_is_logged_in') ) { + return; + } else { + include_once( '../functions/display_messages.php' ); + logout_error( _("You must be logged in to access this page.") ); exit; } +} -?> +?> \ No newline at end of file