aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_html.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions_html.inc.php')
-rw-r--r--include/functions_html.inc.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index b0f123a14..5af5c1862 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -273,15 +273,16 @@ function tag_alpha_compare($a, $b)
*/
function access_denied()
{
- global $user;
+ global $user, $conf;
$login_url =
get_root_url().'identification.php?redirect='
.urlencode(urlencode($_SERVER['REQUEST_URI']));
- set_status_header(401);
if ( isset($user) and !is_a_guest() )
{
+ set_status_header(401);
+
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
echo '<div style="text-align:center;">'.l10n('You are not authorized to access the requested page').'<br>';
echo '<a href="'.get_root_url().'identification.php">'.l10n('Identification').'</a>&nbsp;';
@@ -289,6 +290,10 @@ function access_denied()
echo str_repeat( ' ', 512); //IE6 doesn't error output if below a size
exit();
}
+ elseif (!$conf['guest_access'] and is_a_guest())
+ {
+ redirect_http($login_url);
+ }
else
{
redirect_html($login_url);