Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:createAndPromote.php

From mediawiki.org
Translate this page
Languages:
MediaWiki version:
1.7
MediaWiki file: createAndPromote.php
Location:maintenance/
Source code:master1.44.21.43.51.39.15
Classes:CreateAndPromote

Details

[edit]

createAndPromote.php is amaintenance 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 userwithout promoting them, the namecreateAndPromote.php is somewhat misleading.

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

Options/Arguments

[edit]
OptionDescriptionRequired?
<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
--emailSet or change user emailOptional
--bureaucratAdd the account to the bureaucrat groupOptional
--sysopAdd the account to the sysop groupOptional
--botAdd the account to the bot groupOptional
--interface-adminAdd the account to the interface-admin groupOptional
--custom-groupsComma-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
--forceIf account already exists, just grant it rights, change email or change password. Do not create a new account in this case.Optional
--helpDisplay help information for the script.Optional


Usage

[edit]
MediaWiki version:
1.39
phpmaintenance/createAndPromote.php<username>[<password>|--bureaucrat|--sysop|--bot|--interface-admin|--custom-groupsgroup1,group2|--force]
MediaWiki version:
1.40
phpmaintenance/run.phpcreateAndPromote<username>[<password>|--bureaucrat|--sysop|--bot|--interface-admin|--custom-groupsgroup1,group2|--force]
Terminal
$ php maintenance/run.php createAndPromote Admin mypassword --bureaucrat --sysop --custom-groups developermywiki: 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

[edit]
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:CreateAndPromote.php&oldid=7910605"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp