aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-02-23 23:50:26 +0000
committerrub <rub@piwigo.org>2007-02-23 23:50:26 +0000
commit027db797b2853e682c36793d35a2987c9e1cbc0a (patch)
tree92ba455428bc6dfdd21d5c5ef55cad8bcc7850aa /include/functions_user.inc.php
parentf800d4fb40468fbf255ac78ccd2da82544f8d557 (diff)
Fix bug on my revision 1851.
git-svn-id: http://piwigo.org/svn/trunk@1854 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_user.inc.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 6b0b110c8..8be4f03cb 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -2,9 +2,8 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
@@ -983,28 +982,25 @@ function get_access_type_status($user_status='')
{
global $user, $conf;
- if ($user_status == '' and isset($user['status']) )
+ if (empty($user_status))
{
- $user_status = $user['status'];
+ if (isset($user['status']))
+ {
+ $user_status = $user['status'];
+ }
+ else
+ {
+ // swicth to default value
+ $user_status = '';
+ }
}
- $access_type_status = ACCESS_NONE;
switch ($user_status)
{
case 'guest':
{
- if
- (
- !isset($user) or
- ($user['id']==$conf['guest_id'] and !$conf['guest_access'])
- )
- {
- $access_type_status = ACCESS_NONE;
- }
- else
- {
- $access_type_status = ACCESS_GUEST;
- }
+ $access_type_status =
+ ($conf['guest_access'] ? ACCESS_GUEST : ACCESS_NONE);
break;
}
case 'generic':
@@ -1027,6 +1023,10 @@ function get_access_type_status($user_status='')
$access_type_status = ACCESS_WEBMASTER;
break;
}
+ case 'default':
+ {
+ $access_type_status = ACCESS_NONE;
+ }
}
return $access_type_status;