Page MenuHomePhabricator

AutoAuthenticate hook doesn't pass user by reference
Closed, ResolvedPublic

Description

Author: scott

Description:
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.


Version: 1.8.x
Severity: normal
OS: Linux

Details

Reference
bz7831

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:23 PM
bzimport set Reference to bz7831.
bzimport added a subscriber: Unknown Object (MLST).

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.