Consultation on how to obtain user information

So that was enough? You might also also do something like

user_ids=user_data.pluck(:UserID)