Manual:demoteIneligibleUsers.php
Appearance
| MediaWiki file: demoteIneligibleUsers.php | |
|---|---|
| Location: | maintenance/ |
| Source code: | master • 1.46.0 • 1.45.4 • 1.43.9 |
| Classes: | DemoteIneligibleUsers |
demoteIneligibleUsers.php is a maintenance script that is located in the maintenance directory used to demote users from user groups if they do not meet the specified requirements set in $wgRestrictedGroups.
Parameters
[edit]| Option | Description | Required |
|---|---|---|
| --dry-run | If set, the script will perform no actual changes, just print the list of users and groups that would be affected | Optional |
| --relay-log | Pairs of groups and wikis where a replicated log entry should appear for demotions from that group | Optional |
Usage
[edit]The script can be invoked without any command-line arguments, like below:
Terminal
$ php maintenance/run.php demoteIneligibleUsers Removing groups from 1 users... Removed groups from FooBar: sysop, bureaucrat Finished processing. Removed groups from 1 users
On Wikimedia wikis, where changes to certain groups are expected to be logged to Meta-Wiki, a setup like below is used:
Terminal
$ php maintenance/run.php demoteIneligibleUsers --relay-log checkuser=metawiki --relay-log suppress=metawiki Removing groups from 1 users... Removed groups from FooBar: sysop, bureaucrat Finished processing. Removed groups from 1 users