added get_user_emails_by_id function