https://bugzilla.wikimedia.org/show_bug.cgi?id=41201
Web browser: ---
Bug #: 41201
Summary: UserLoadFromSession considered evil
Product: MediaWiki extensions
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: CentralAuth
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
Running code from CentralAuth, AbuseFilter, TitleBlacklist etc. which
collectively call half the codebase does not seem like a good thing to be doing
while the main context user is half-initialised and has lots of methods which
will fail horribly if you try to call them (e.g. bug 41198).
Perhaps initialisation of the User object from the session can be moved to a
function called from Setup.php, such as RequestContext::getUser(). It's not
lazy-loaded anyway, User::newFromSession() has always been called
unconditionally. Then CentralAuth (and anything else that uses the
UserLoadFromSession hook) can be called without User::load() in its call stack.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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