no need for isset($user_ids) is always set
better: if (!empty($user_ids))