https://bugzilla.wikimedia.org/show_bug.cgi?id=52894
Web browser: ---
Bug ID: 52894
Summary: The mw.user object needs to be rewritten
Product: MediaWiki
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: JavaScript
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l