Last modified: 2010-05-15 15:42:49 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 T9831, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7831 - AutoAuthenticate hook doesn't pass user by reference
AutoAuthenticate hook doesn't pass user by reference
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.8.x
All Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-07 14:52 UTC by Scott MacVicar
Modified: 2010-05-15 15:42 UTC (History)
0 users

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


Attachments

Description Scott MacVicar 2006-11-07 14:52:59 UTC
The AutoAuthenticate hook doesn't pass the $user entry by reference, this makes
it nigh impossible to auto create a user if one doesn't exist.

--- includes/StubObjectold.php
+++ includes/StubObject.php
@@ -121,6 +121,6 @@
$user->setLoaded( true );
} else {
$user = User::loadFromSession();
-wfRunHooks('AutoAuthenticate',array($user));
+wfRunHooks('AutoAuthenticate',array(&$user));
}
return $user;

With the above change the User object can be changed to a valid user if it
didn't exist.
Comment 1 Brion Vibber 2006-11-09 11:42:01 UTC
This was already fixed on trunk for 1.9; fixed on 1.8 branch in r17508, will be in 1.8.3 if/when released.

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


Navigation
Links