GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Get MediaWiki
  • Get extensions
  • Tech blog
  • Contribute
  • User help
  • FAQ
  • Technical manual
  • Support desk
  • Communication
  • Developer portal
  • Code statistics
  • Community portal
  • Recent changes

This view

  • Original page
  • New address

GeezerVison is showing www.mediawiki.org — Manual:createAndPromote.php - MediaWiki

MediaWiki version:
≥ 1.7
MediaWiki file: createAndPromote.php
Location: maintenance/
Source code: master • 1.46.2 • 1.45.6 • 1.43.11
Classes: CreateAndPromote

Details

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 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 them, the name createAndPromote.php is somewhat misleading.

This script cannot be used to remove user groups from users.

Options/Arguments

Option Description Required?
<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. Required
<password> The password for the user. Required
--email Set or change user email. This option was added in MW1.45. On earlier versions you could first use CreateAndPromote.php, then use resetUserEmail.php with the --no-reset-password option. Optional
--bureaucrat Add the account to the bureaucrat group Optional
--sysop Add the account to the sysop group Optional
--bot Add the account to the bot group Optional
--interface-admin Add the account to the interface-admin group Optional
--custom-groups 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 $wgGroupPermissions and $wgRevokePermissions . Non-existing groups are ignored.
Optional
--force If account already exists, just grant it rights, change email or change password. Do not create a new account in this case. Optional
--help Display help information for the script. Optional


Usage

MediaWiki version:
≤ 1.39
php maintenance/createAndPromote.php <username> [ <password>| --bureaucrat| --sysop| --bot| --interface-admin| --custom-groups group1,group2| --force ]
MediaWiki version:
≥ 1.40
php maintenance/run.php createAndPromote <username> [ <password>| --bureaucrat| --sysop| --bot| --interface-admin| --custom-groups group1,group2| --force ]
Terminal
$ php maintenance/run.php createAndPromote Admin mypassword --bureaucrat --sysop --custom-groups developer

mywiki: Creating and promoting User:Admin into sysop, bureaucrat...
done.

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

See also

  • Manual:User rights
  • emptyUserGroup.php
  • migrateUserGroup.php
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:CreateAndPromote.php&oldid=8628508"
Categories:
  • MediaWiki code pages without namespaces
  • MediaWiki code
  • Maintenance scripts
  • User maintenance scripts
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.