aboutsummaryrefslogtreecommitdiffstats
path: root/include/user.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2004-12-20 23:54:59 +0000
committerplegall <plg@piwigo.org>2004-12-20 23:54:59 +0000
commit6409647e1c9e9d13913c9d4b3d882511dc51f52d (patch)
tree9dbc8276db16c6ed8f0415a380f4ddafa20a8e6a /include/user.inc.php
parent82cb16095cd271ba780345cd3a17af7f91e9f45d (diff)
- 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
Diffstat (limited to '')
-rw-r--r--include/user.inc.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/user.inc.php b/include/user.inc.php
index c4dc68987..468eca3f0 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -105,6 +105,20 @@ foreach ($row as $key => $value)
}
}
+// properties of user guest are found in the configuration
+if ($user['is_the_guest'])
+{
+ $user['template'] = $conf['default_template'];
+ $user['nb_image_line'] = $conf['nb_image_line'];
+ $user['nb_line_page'] = $conf['nb_line_page'];
+ $user['language'] = $conf['default_language'];
+ $user['maxwidth'] = $conf['default_maxwidth'];
+ $user['maxheight'] = $conf['default_maxheight'];
+ $user['recent_period'] = $conf['recent_period'];
+ $user['expand'] = $conf['auto_expand'];
+ $user['show_nb_comments'] = $conf['show_nb_comments'];
+}
+
// if no information were found about user in user_forbidden table OR the
// forbidden categories must be updated
if (!isset($user['need_update'])
@@ -138,6 +152,13 @@ if (empty($user['language'])
}
include_once(PHPWG_ROOT_PATH.'language/'.$user['language'].'/common.lang.php');
+// displaying the username in the language of the connected user, instead of
+// "guest" as you can find in the database
+if ($user['is_the_guest'])
+{
+ $user['username'] = $lang['guest'];
+}
+
// only if we are in the administration section
if (defined('IN_ADMIN') and IN_ADMIN)
{