From 6409647e1c9e9d13913c9d4b3d882511dc51f52d Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 20 Dec 2004 23:54:59 +0000 Subject: - new feature : lock temporary your gallery for maintenance - $user keys for guest user are initialized with default values of $conf git-svn-id: http://piwigo.org/svn/trunk@653 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_user.inc.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include/functions_user.inc.php') diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 97087827f..f8b47083b 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -158,7 +158,7 @@ function update_user( $user_id, $mail_address, $status, function check_login_authorization($guest_allowed = true) { - global $user,$lang; + global $user,$lang,$conf,$template; if ($user['is_the_guest'] and !$guest_allowed) { @@ -166,6 +166,17 @@ function check_login_authorization($guest_allowed = true) echo ''.$lang['ident_title'].''; exit(); } + + if ($conf['gallery_locked']) + { + echo '
'; + echo $lang['gallery_locked_message']; + echo '
'; + if ($user['status'] != 'admin') + { + exit(); + } + } } function setup_style($style) -- cgit v1.2.3