Handboek:createAndPromote.php
MediaWiki-versie: | ≥ 1.7 |
MediaWiki bestand: createAndPromote.php | |
---|---|
Locatie: | maintenance/ |
Broncode: | master • 1.38.1 • 1.37.2 • 1.35.6 |
Classes: | CreateAndPromote |
Details
createAndPromote.php is een onderhoudsscript dat een nieuwe gebruiker aanmaakt of een bestaande gebruiker wijzigt. Voor de corresponderende gebruiker kan het script vervolgens aanvullende rechten verlenen, en het wachtwoord van de gebruiker wijzigen.
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
Optie | Beschrijving | 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> | Wachtwoord voor de gebruiker. | Optional |
--bureaucrat | Voegt het account toe aan de groep bureaucraten | Optional |
--sysop | Voegt het account toe aan de groep sysops | Optional |
--bot | Voegt het account toe aan de groep bots | Optional |
--interface-admin | Add the account to the interface-admin group | Optional |
--custom-groups | Comma-separated list of groups to add the user to. Hierdoor kan de gebruiker aan elke aangepaste groep worden toegevoegd. Since MW 1.27, a user is only added to a custom group, if this group actually exists according to $wgGroupPermissions and $wgRevokePermissions . Niet bestaande groepen worden genegeerd. |
Optional |
--force | If account already exists, just grant it rights or change password. Do not create a new account in this case. | Optional |
--help | Toont help informatie voor het script. | Optional |
Gebruik
php maintenance/createAndPromote.php <username> [ <password>| --bureaucrat| --sysop| --bot| --interface-admin| --custom-groups group1,group2| --force ]
Terminal
$ php maintenance/createAndPromote.php WikiSysop mypassword --bureaucrat --sysop --custom-groups developer mywiki: Creating and promoting User:WikiSysop into sysop, bureaucrat... done.
This creates a new user called "WikiSysop", sets the password and adds the user to the bureaucrat group, the sysop group and to the custom developer group.