#12859 Fixed groups
This commit is contained in:
parent
b4c8e81e86
commit
e8bd4b9e6b
|
@ -117,12 +117,25 @@ if ($method === 'draw') {
|
||||||
$where_name = 'name LIKE "%'.$filter['free_search'].'%"';
|
$where_name = 'name LIKE "%'.$filter['free_search'].'%"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_user_admin($config['id_user']) === false) {
|
||||||
|
$group_list = \users_get_groups(
|
||||||
|
$config['id_ser'],
|
||||||
|
'RR',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$where_group = '';
|
$where_group = '';
|
||||||
if (empty($filter['group']) === false && $filter['group'] !== '0') {
|
if (empty($filter['group']) === false && $filter['group'] !== '0') {
|
||||||
$where_group = sprintf('id_group = %s', $filter['group']);
|
$where_group = sprintf('id_group = %s', $filter['group']);
|
||||||
if (empty($where_name) === false) {
|
if (empty($where_name) === false) {
|
||||||
$where_group = 'AND '.$where_group;
|
$where_group = 'AND '.$where_group;
|
||||||
}
|
}
|
||||||
|
} else if (empty($group_list) === false) {
|
||||||
|
$where_group = sprintf('id_group IN (%s)', implode(',', array_keys($group_list)));
|
||||||
|
if (empty($where_name) === false) {
|
||||||
|
$where_group = 'AND '.$where_group;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$where = '';
|
$where = '';
|
||||||
|
|
Loading…
Reference in New Issue