mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
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
This commit is contained in:
@@ -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
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user