MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

action=userrights

(main | userrights)
  • Questo modulo richiede i diritti di lettura.
  • Questo modulo richiede i diritti di scrittura.
  • Questo modulo accetta solo richieste POST.
  • Fonte: MediaWiki
  • Licenza: GPL-2.0+

Change a user's group membership.

Parametri:
user

Nome utente.

Tipo: nome utente
userid

ID utente.

Tipo: intero
add

Aggiungere l'utente a questi gruppi, o se sono già membri, aggiornare la scadenza della loro appartenenza a quel gruppo.

Valori (separati da | o alternativa): bot, sysop, bureaucrat, editors, registrati, sostenitori, staff
expiry

Expiry timestamps. May be relative (e.g. 5 months or 2 weeks) or absolute (e.g. 2014-09-18T12:34:56Z). If only one timestamp is set, it will be used for all groups passed to the add parameter. Use infinite, indefinite, infinity, or never for a never-expiring user group.

Separa i valori con | o alternativa. Il numero massimo di valori è 50 (500 per i bot).
Predefinito: infinite
remove

Rimuovi l'utente da questi gruppi.

Valori (separati da | o alternativa): bot, sysop, bureaucrat, editors, registrati, sostenitori, staff
reason

Motivo del cambiamento.

Predefinito: (vuoto)
token

Un token "userrights" recuperato da action=query&meta=tokens

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

Questo parametro è obbligatorio.
tags

Change tags to apply to the entry in the user rights log.

Valori (separati da | o alternativa):
Esempi:
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 [apri in una 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 [apri in una sandbox]
Add user SometimeSysop to group sysop for 1 month.
api.php?action=userrights&user=SometimeSysop&add=sysop&expiry=1%20month&token=123ABC [apri in una sandbox]