Last modified: 2014-02-13 19:25:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 52894 - The mw.user object needs to be rewritten
The mw.user object needs to be rewritten
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: code_quality 39813
  Show dependency treegraph
 
Reported: 2013-08-15 20:28 UTC by Tyler Romeo
Modified: 2014-02-13 19:25 UTC (History)
5 users (show)

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


Attachments

Description Tyler Romeo 2013-08-15 20:28:08 UTC
What the title says. It's a pretty terrible interface, and needs to be redesigned. Here are some of the issues with it:

* Is just an object, so there's no way for other code to make user objects for other users,
* Has a bunch of functions (see user.bucket(), user.sessionId()) that don't belong there,
* Doesn't give you an IP address for anonymous users when calling getName(), making it tough to get an identifier for that user (E:Annotator just ran into this problem),
* Doesn't have username validation functions, which would be useful for client-side validation.

In the end, it's only useful purpose is the ability to retrieve the current user's name and ID, and even then the getId and getName functions are just wrappers for mw.config, so it's pretty trivial to get the info manually.

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


Navigation
Links