Avoid the news search for users without groups
This commit is contained in:
parent
4d9ebb90b1
commit
d1608400f9
|
@ -2273,6 +2273,10 @@ function get_news($arguments) {
|
|||
$limit = get_argument ('limit', $arguments, 99999999);
|
||||
|
||||
$id_group = array_keys(users_get_groups($id_user, false, true));
|
||||
|
||||
// Empty groups
|
||||
if (empty($id_group)) return array();
|
||||
|
||||
$id_group = implode(',',$id_group);
|
||||
$current_datetime = date('Y-m-d H:i:s', time());
|
||||
$modal = (int) $modal;
|
||||
|
|
Loading…
Reference in New Issue