Last modified: 2013-04-22 16:15:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46943, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44943 - Account creation MediaWiki API module (action=createaccount) help needs cleanup
Account creation MediaWiki API module (action=createaccount) help needs cleanup
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Tyler Romeo
https://www.mediawiki.org/w/api.php?a...
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-13 11:03 UTC by MZMcBride
Modified: 2013-04-22 16:15 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2013-02-13 11:03:47 UTC
From <https://www.mediawiki.org/w/api.php>:

---
* action=createaccount *
  Create a new user account.

This module requires write rights
This module only accepts POST requests
Parameters:
  name                - User Name
                        This parameter is required
  password            - Password (ignored if mailpassword is set)
  domain              - Domain (optional)
  token               - Account creation token obtained in first request
  email               - Email address of user
  realname            - Real Name of user
  mailpassword        - Whether to generate and mail a random password to the user
  reason              - Optional reason for creating the account (used when mailpassword is set)
  language            - Language code to set for the user.
Examples:
  api.php?action=createaccount&name=testuser&password=test123
  api.php?action=createaccount&name=testmailuser&mailpassword=true&reason=MyReason
Help page:
  https://www.mediawiki.org/wiki/API:Account creation
---

* It should be "User name" or "Username"; may help to have a pointer here to what constitutes a valid user name (length limit, character restrictions, prefix restrictions, etc.)...
* It's completely unclear what the "Domain" parameter is (it's equally unclear in the GUI as well...); I think most people would assume this would the wiki's domain name (e.g., "en.wikipedia.org")
* "E-mail" is hyphenated in the MediaWiki interface, I believe
* "Real name", not "Real Name"
* Real name field isn't marked optional (or disabled... not even sure it works on Wikimedia wikis due a configuration variable)
* It's unclear how you set mailpassword (&mailpassword=true perhaps or &mailpassword=1)
* It's unclear whether the reason field is used when mailpassword is _not_ set
* Not sure how the language parameter got in here... this isn't available via index.php, is it?
* Help page URL is missing an underscore

I'm not totally thrilled all of this got through code review and ended up in production, to be honest.
Comment 1 Brad Jorsch 2013-02-13 14:28:42 UTC
Yes, that does seem to need cleanup.

(In reply to comment #0)
> * It should be "User name" or "Username"; may help to have a pointer here to
> what constitutes a valid user name (length limit, character restrictions,
> prefix restrictions, etc.)...

A pointer to that information is unlikely, since this much of this is different on different wikis. In general, we assume an API user knows how to look up what makes a valid user name, page title, and so on if they don't already know.

> * It's unclear how you set mailpassword (&mailpassword=true perhaps or
> &mailpassword=1)

It's a general API thing: any boolean parameter is set if it is present at all. Even &mailpassword=0, &mailpassword=false, and &mailpassword= count as "set". Just like HTML form checkboxes.
Comment 2 Tyler Romeo 2013-02-13 21:02:15 UTC
(In reply to comment #0)
> * It's completely unclear what the "Domain" parameter is (it's equally
> unclear
> in the GUI as well...); I think most people would assume this would the
> wiki's
> domain name (e.g., "en.wikipedia.org")

TBH, to this day I also have absolutely no idea what the domain parameter is. It's some sort of parameter added in for external authentication modules.

> I'm not totally thrilled all of this got through code review and ended up in
> production, to be honest.

That's a bit harsh. All of these are quite minor documentation problems that can be fixed easily.
Comment 3 Tyler Romeo 2013-02-13 22:43:32 UTC
https://gerrit.wikimedia.org/r/48966
Comment 4 MZMcBride 2013-02-14 02:02:30 UTC
(In reply to comment #2)
> (In reply to comment #0)
>> I'm not totally thrilled all of this got through code review and ended up in
>> production, to be honest.
> 
> That's a bit harsh. All of these are quite minor documentation problems that
> can be fixed easily.

A bit. Sorry. By the time I did a full read of the module's help section and I saw that the URL was broken, I was a little annoyed.

(In reply to comment #3)
> https://gerrit.wikimedia.org/r/48966

Thanks for this. :-)  I left a few minor comments on the changeset.
Comment 5 Alex Monk 2013-02-17 21:58:48 UTC
Merged.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links