Jump to content

API:Bearbeiten - Benutzereinstellungen festlegen

From mediawiki.org
This page is a translated version of the page API:Edit - Set user preferences and the translation is 100% complete.

SetUserPreferences

Die Aktion SetUserPreferences ermöglicht es, das Benutzerprofil zu bearbeiten, indem Profil-Parameter, wie Name, Email, neues Passwort, die geändert werden sollen, übergeben werden. Wie bei anderen Funktionen müssen sensible Parameter in der POST-Form übergeben werden.

Beispielabfrage und Antwort:

Anfrage:
  api.php ? action=setuserpreferences 
Post parameters:

  pruserid = 23		   Obtained when the user has logged in.
  prusertoken = ber0cd5aa1bda4a5ve7lez230570b00na1a          Obtained when the user has been logged
  [ proldpassword = 123abc ]		   Old password the user used to have  
  [ prnewpassword = 123abc ]		   New password desired by the user  
  [ prretypepassword = 123abc ]		   Retyping the new desired password is required  
  [ prname = "John" ]	   User Name. It is not a mandatory field
  [ premail = john.smith@yahoo.com ]	   User email address
  [ prnickname = "Johnny" ]		   User signature
  [ ccmeonemail = yes/no ]		   To send me copies of emails sent to other users
  [ premailflag = yes/no ]		   Enable email from other users
  
Antwort:
api:
   userpreferences:
              result: Success		  Other values: UserIsAnon, WrongPassword, BadRetype, WrongEmailAddress

.