Override existing user preferences

(Alex Armstrong) #1

There’s an option in Admin UI to override new user preferences.

Is there a way of overriding existing user preferences?

I’d like to set all users’ settings to these:

And also to add a category (Announcements) to their Watched category list.

(cpradio) #2

Yes, search Admin > Settings area for the word ‘default’

Note: This only applies to new user signups, current users will not have their preferences changed.

(Alex Armstrong) #3

As I say in the original topic:

Edit: I revised the title of the topic to make my question more clear.

(cpradio) #4

Console App. You can Run a command in the Rails Console, @zogstrip has provided a few examples in other topics on how to do it.

Here is one such instance

(Allen - Watchman Monitoring) #5

The ability to use the UI to push down a setting to all current users, one time, would make implementing new features So Much Better.



An option in the admin UI to “apply to all” could help all existing Discourse communities, especially ones which are Hosted, where admins don’t have access to the rails console at all.

(Mittineague) #6

Though I can see where such a feature could be helpful, IMHO this is dangerous territory.

I have no problems with default values for new users.

BUT - if I have set a preference option and it changed

  • at best I would think it was a fluke, likely a mistake I made
  • I might think it was a bug in the app and hope it was transient and / or since fixed
  • at worse I would be aggravated that others had hijacked my settings trying to force them on me

(Allen - Watchman Monitoring) #7

Good points @Mittineague but where I need this is in cases where:

  • there is a new feature in discourse and I need to set its value for everyone retroactively
  • if I add a new Category and want it to be in everyone’s Watch list by default (they can unfollow if they want)
  • if we are generally changing how the forum works for whatever internal politicking reason.

In all of these cases, the need here is to be able to Fix Our Forum for our users. If I expected to have to use this feature regularly on the same setting, I’d be asking for a way to lock the preference in place.

If I were starting a discourse now, I may not need this as much, at least not until I added a new category, or the next new feature in discourse was added) As it stands, the 4 Discourse I manage all had many users were created before we (as discourse admins) even had a chance to set the desired defaults.

Watching Categories based on on group in discourse