Pomoc MediaWiki API

To jest automatycznie wygenerowana strona dokumentacji MediaWiki API. Dokumentacja i przykłady: https://www.mediawiki.org/wiki/API

action=userrights

(main | userrights)
  • Ten moduł wymaga praw odczytu.
  • Ten moduł wymaga praw zapisu.
  • Ten moduł akceptuje tylko żądania POST.
  • Źródło: MediaWiki
  • Licencja: GPL-2.0+

Change a user's group membership.

Parametry:
user

Nazwa użytkownika.

Typ: nazwa użytkownika
userid

User ID.

Type: integer
add

Add the user to these groups.

Wartości (oddziel za pomocą |): bot, sysop, bureaucrat
remove

Remove the user from these groups.

Wartości (oddziel za pomocą |): bot, sysop, bureaucrat
reason

Powód zmiany.

Domyślnie: (puste)
token

Token "userrights" zdobyty z action=query&meta=tokens

For compatibility, the token used in the web UI is also accepted.

Ten parametr jest wymagany.
Przykłady:
Add user FooBot to group bot, and remove from groups sysop and bureaucrat.
api.php?action=userrights&user=FooBot&add=bot&remove=sysop|bureaucrat&token=123ABC [open in sandbox]
Add the user with ID 123 to group bot, and remove from groups sysop and bureaucrat.
api.php?action=userrights&userid=123&add=bot&remove=sysop|bureaucrat&token=123ABC [open in sandbox]