Converted User to use lazy initialisation. This is to avoid unstub loops, and also...
[lhc/web/wiklou.git] / includes / StubObject.php
index ed3b117..9d21931 100644 (file)
@@ -118,9 +118,8 @@ class StubUser extends StubObject {
                global $wgCommandLineMode;
                if( $wgCommandLineMode ) {
                        $user = new User;
-                       $user->setLoaded( true );
                } else {
-                       $user = User::loadFromSession();
+                       $user = User::newFromSession();
                        wfRunHooks('AutoAuthenticate',array($user));
                }
                return $user;