r42043 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42042‎ | r42043 | r42044 >
Date:19:00, 13 October 2008
Author:laner
Status:old (Comments)
Tags:
Comment:
Adding hook UserLoadAfterLoadFromSession to fix bug 14178
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -1354,10 +1354,14 @@
13551355 $user: user object
13561356 $name: user name
13571357
1358 -'UserLoadFromSession': called to authenticate users on external/environmental means
 1358+'UserLoadFromSession': called to authenticate users on external/environmental means; occurs before session is loaded
13591359 $user: user object being loaded
13601360 &$result: set this to a boolean value to abort the normal authentification process
13611361
 1362+'UserLoadFromSession': called to authenticate users on external/environmental means; occurs after session is loaded
 1363+$user: user object being loaded
 1364+&$result: set this to a boolean value to abort the normal authentification process
 1365+
13621366 'UserLoginComplete': after a user has logged in
13631367 $user: the user object that was created on login
13641368 $inject_html: Any HTML to inject after the "logged in" message.
Index: trunk/phase3/includes/User.php
@@ -247,6 +247,7 @@
248248 break;
249249 case 'session':
250250 $this->loadFromSession();
 251+ wfRunHooks( 'UserLoadAfterLoadFromSession', array( $this, &$result ) );
251252 break;
252253 default:
253254 throw new MWException( "Unrecognised value for User->mFrom: \"{$this->mFrom}\"" );
Index: trunk/phase3/RELEASE-NOTES
@@ -256,6 +256,7 @@
257257 user can only change his rights
258258 * (bug 15846) Categories "leak" from older revisions in certain circumstances
259259 * (bug 15928) Special pages dropdown should be inline in non-MonoBook skins
 260+* (bug 14178) Some uses of UserLoadFromSession hook cause segfault
260261
261262 === API changes in 1.14 ===
262263

Comments

#Comment by Brion VIBBER (talk | contribs)   19:08, 13 October 2008

wfRunHooks( 'UserLoadAfterLoadFromSession', array( $this, &$result ) );

^ the $result value is never used

#Comment by Brion VIBBER (talk | contribs)   19:24, 13 October 2008

Removed in r42049

Status & tagging log