aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-01-19 11:18:55 +0000
committerplegall <plg@piwigo.org>2011-01-19 11:18:55 +0000
commit8a7004e61e0bfcab3947f00bc3c831c5ff11c9a5 (patch)
tree2ff6456f607354bffa6fa4a1c30a750f3c3a08a1 /admin
parent2eab6069700787e0e7746bde544352bc21f1cf4a (diff)
bug 2018: now when a user gets an "admin" or "webmaster" status he
automatically gets the "admin" privacy level. git-svn-id: http://piwigo.org/svn/trunk@8758 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/user_list.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/admin/user_list.php b/admin/user_list.php
index 2b9cac509..af76a291f 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -432,6 +432,21 @@ DELETE FROM '.USER_GROUP_TABLE.'
}
}
+ // if the status is getting greater or equal to "admin", then level
+ // automatically switches to "admin" (8), unless the level is also
+ // defined in the same batch action.
+ if (isset($data['status']) and in_array($data['status'], array('webmaster', 'admin')))
+ {
+ if (!isset($data['level']))
+ {
+ $data['level'] = 8;
+ if (!in_array('level', $dbfields['update']))
+ {
+ array_push($dbfields['update'], 'level');
+ }
+ }
+ }
+
// special users checks
if
(