Because I think messing with members Preference settings has too much risk of upsetting members I’ve not tried it.
But basically it’s running a well crafted query in the CLI eg.
If you need to update the user preference for all of your users or a large subset of users, you can do so via the rails console.
From console, run these commands to enter the rails console for Discourse
./launcher enter app
rails c
Then, run a command that selects the set of users you wish to update.
Examples
Set the last seen date for users who have never logged in
User.where("last_seen_at IS NULL").update_all(last_seen_at: 1.week.ago)
Unset mailing list mode for all users who may have se…
Following the release of Discourse v2.4.0.beta7 (or if you have this commit ), admins now have the option to set the category tracking levels of all existing users when setting the default category tracking levels in their site settings:
Add a category to one of the following site settings, then select the green checkbox button.
[10%20PM]
A modal window will pop up with the following options:
[10%20PM]
The old way using the console Discourse allows you to specify
default…
Want to change ownership of all the posts by a specific user? Let’s do it!
If your site is hosted by Discourse, please reach out to our support team at team@discourse.org if you need to change ownership of all posts from a user.
Access Your Site
First connect to your Droplet via SSH, and enter the Docker container for your Discourse instances:
cd /var/discourse
./launcher enter app
Change ownership of all public posts
rake users:change_post_ownership["old_username","new_usernam…