# Ruby מצא מערך של מזהי משתמשים

**URL:** <https://meta.discourse.org/t/ruby-find-array-of-users-id/259469>\
**Category:** Development\
**Created:** [26 במרץ,‏ 2023,‏ 6:58pm UTC](https://meta.discourse.org/t/ruby-find-array-of-users-id/259469 "2023-03-26T18:58:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![bXunter](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bXunter](https://meta.discourse.org/u/bXunter)\
**Post date:** [26 במרץ,‏ 2023,‏ 8:02pm UTC](https://meta.discourse.org/t/ruby-find-array-of-users-id/259469/3 "2023-03-26T20:02:15Z")

</div>

Hey Jay… the thing is that I dont need to update all users… just some of them with random set of IDs.

I’ve try with `u = User.find_by_id([150,152,167,258,665])`

But that always return for 150 ID and change password for only that User. Also try with `User.find(id: 150,152....)` didnt help…

Note: I’m trying to migrate the forum to another disscusion platform, and there are a number of users who have written a bunch of messages but are no longer coming to the forum (and for some reason the password\_hash and salt columns are empty for those users, the user import script does not allow importing users who do not have these values ​​defined in the PGSQL database.), so I can’t let them reset their passwords. What I can do is that I set a complicated password, and they can certainly go to the Forgotten password option and reset a new one later.

---

_[View the full topic](https://meta.discourse.org/t/ruby-find-array-of-users-id/259469)._
