In CentralAuth (and related changes interface changes in Newuserlog and the core):
* Moved the AutoAuthenticate hook to User::loadFromSession(), to defer processing for longer and avoid unstub loops
* Undeprecated User::setID()
* Added partial support for new user log registration and IP-based blocking of automatically created accounts. Still needs the same support implemented in Special:Userlogin.
* Fixed all inappropriate uses of the term "DB name", changing them to "wiki" or "wiki ID". Renamed the relevant database fields.
* Refactored central session and cache support
$user = new User;
} else {
$user = User::newFromSession();
- wfRunHooks( 'AutoAuthenticate', array( &$user ) );
}
return $user;
}
private function loadFromSession() {
global $wgMemc, $wgCookiePrefix;
+ $result = null;
+ wfRunHooks( 'UserLoadFromSession', array( $this, &$result ) );
+ if ( $result !== null ) {
+ return $result;
+ }
+
if ( isset( $_SESSION['wsUserID'] ) ) {
if ( 0 != $_SESSION['wsUserID'] ) {
$sId = $_SESSION['wsUserID'];
/**
* Set the user and reload all fields according to that ID
- * @deprecated use User::newFromId()
*/
function setID( $v ) {
- wfDeprecated( __METHOD__ );
$this->mId = $v;
$this->clearInstanceCache( 'id' );
}