واجهة برمجة التطبيقات:تعديل – ضبط تفضيلات المستخدم

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

SetUserPreferences

يسمح تصرف SetUserPreference بتعديل ملف تعريف كل مستخدم عن طريق تمرير أي متغيرات في ملف التعريف يكون مرغوبا في تعديلها مثل الاسم أو عنوان البريد الإلكتروني أو كلمة مرور جديدة. حسب ما هو مبين في سمات أخرى، يتعين تمرير تغيرات مقبولة من خلال نموذج POST.

نموذج من الطلب والنتيجة:

الطلب:
  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
  
النتيجة:
api:
   userpreferences:
              result: Success		  Other values: UserIsAnon, WrongPassword, BadRetype, WrongEmailAddress

.