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:
plegall
2011-01-19 11:18:55 +00:00
parent 2eab606970
commit 8a7004e61e

View File

@@ -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
(