[ticket/11492] Initialize $user_ids and $group_users arrays

Also avoid unneccessary calls to permissions when user_ids is empty

PHPBB3-11492