Modifying MediaWiki user preferences at once
Submitted by toniher on
LocalSettings.php
. Example:
$wgDefaultUserOptions['editsection'] = 0;However, if the wiki is not new, there could be already several users who will have inherited previous default preferences before any change is performed in
LocalSettings.php
.
In order to solve this, in recent MediaWiki versions there is a maintenance script for changing a user preference value for all users in the wiki.
Nonetheless, in my case, I did not want to change the preference value for all users, but only for those ones belonging to a certain group. Of course, more complex filtering criteria could be devised…
For anyone who might need it, the code (in Perl) I used below: