API:编辑——设置用户参数
本页是MediaWiki Action API帮助文档的一部份。 |
此页面已过时。其仅作为历史记录保留。 它可能记载废弃的和/或不再支持的扩展或功能。 不要认为这里的信息是最新的。 这是一个旧提案。 没有引进 action=setuserpreferences 。 请参见action=options 。 |
SetUserPreferences
SetUserPreferences action allows to edit each user profile by passing any profile parameters which are desired to be changed such as name, email, newpassword. As shown in other features, sensible parameters must be passed by POST form.
Sample request and response:
请求: 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
.