# שינוי אצווה של תצורה דרך CLI בפרופילי משתמש/העדפות מרובים

**URL:** https://meta.discourse.org/t/bulk-change-of-configuration-via-cli-in-multiple-user-profiles-preferences/162947
**Category:** Support
**Created:** [3 בספטמבר,‏ 2020,‏ 5:52pm UTC](https://meta.discourse.org/t/bulk-change-of-configuration-via-cli-in-multiple-user-profiles-preferences/162947 "2020-09-03T17:52:58Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![rudy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rudy/32/192627_2.png) [@rudy](https://meta.discourse.org/u/rudy)
#### Post date: [4 בספטמבר,‏ 2020,‏ 9:23am UTC](https://meta.discourse.org/t/bulk-change-of-configuration-via-cli-in-multiple-user-profiles-preferences/162947/3 "2020-09-04T09:23:04Z")

</div>

Thank you very much @simon - that code helped me a lot.

I have absolutely ZERO experience with Ruby but I do have experience with other languages so it didn’t take me too long to come with the following code:

```ruby
all_users = User.find_each()

all_users.each do |user|
    if user.id > 70 and user.active == true and user.admin == false and user.trust_level == 1 and user.suspended_at == nil and user.moderator == false
        puts "MODIFY: #{user.id}: #{user.trust_level}: \"#{user.username}\""
        user.update(locale: :fr)
    else
        # skip this user
        puts "------: #{user.id}: #{user.trust_level}: \"#{user.username}\""
    end
end

```

I know nothing about Ruby so there is probably a clever way how to do it. But this works for me 😉 . Thank you.

---

_[View the full topic](https://meta.discourse.org/t/bulk-change-of-configuration-via-cli-in-multiple-user-profiles-preferences/162947)._
