Manual:CreateAndPromote.php/cs

Verze MediaWiki:
1.7
Category:MediaWiki code/cs#CreateAndPromote.php

Podrobnosti

createAndPromote.php je údržbový skript, který vytváří nového uživatele nebo upravuje stávajícího uživatele. 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

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.Požadované
<password>The password for the user.Požadované
--bureaucratAdd the account to the bureaucrat groupVolitelné
--sysopAdd the account to the sysop groupVolitelné
--botAdd the account to the bot groupVolitelné
--interface-adminAdd the account to the interface-admin groupVolitelné
--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.
Volitelné
--forceIf account already exists, just grant it rights or change password. Do not create a new account in this case.Volitelné
--helpDisplay help information for the script.Volitelné

Usage

Verze MediaWiki:
1.39
php maintenance/createAndPromote.php <username> [ <password>| --bureaucrat| --sysop| --bot| --interface-admin| --custom-groups group1,group2| --force ]
Verze MediaWiki:
1.40
php maintenance/run.php createAndPromote <username> [ <password>| --bureaucrat| --sysop| --bot| --interface-admin| --custom-groups group1,group2| --force ]
Terminal

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

Category:Maintenance scripts/cs Category:User maintenance scripts/cs
Category:Maintenance scripts/cs Category:MediaWiki code/cs Category:User maintenance scripts/cs