Manual:createAndPromote.php

From MediaWiki.org
Jump to: navigation, search

Other languages:
català • ‎Deutsch • ‎Ελληνικά • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎한국어 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский

Details[edit]

createAndPromote.php is a maintenance script that creates a new user or modifies an existing user. For the corresponding user, the script can then grant him additional rights (e.g. sysop, bureaucrat or bot rights) and change the user's password.

Since the script can be used not only to create new users, but also on existing users to promote them, and also to create a user without promoting him, the name createAndPromote.php is somewhat misleading.

Usage[edit]

php createAndPromote.php [--bureaucrat] [--sysop] [--bot] [--custom-groups=<group1>,<group2>] [--force] username [password]
Option/Parameter Description
--help Display help information for the script.
--bureaucrat Add the account to the bureaucrat group
--sysop Add the account to the sysop group
--bot (1.22+) Add the account to the bot group
--custom-groups (1.26+) Comma-separated list of groups to add the user to. This allows adding the user to any custom group.
Since MW 1.27, a user is only added to a custom group, if this group actually exists according to $wgGroupPermissionsManual:$wgGroupPermissions and $wgRevokePermissionsManual:$wgRevokePermissions. Non-existing groups are ignored.
--force If account already exists, just grant it rights or change password. Do not create a new account in this case.
<username> The name of the user you want to create or modify and - depending on the other parameters - promote. The --force flag is required if a user with this name already exists.
<password> The password for the user. Not required if --force is used.

Example[edit]

php createAndPromote.php --bureaucrat --sysop --custom-groups=developer WikiSysop mypassword

This creates a new user called "WikiSysop", sets his password and adds the user to the bureaucrat group, the sysop group and to the custom developer group.