Index: trunk/extensions/CentralAuth/CentralAuthHooks.php |
— | — | @@ -383,7 +383,9 @@ |
384 | 384 | wfSetupSession(); |
385 | 385 | if ($token != @$_SESSION['globalloggedin'] ) { |
386 | 386 | $_SESSION['globalloggedin'] = $token; |
387 | | - $user->invalidateCache(); |
| 387 | + if ( !wfReadOnly() ) { |
| 388 | + $user->invalidateCache(); |
| 389 | + } |
388 | 390 | wfDebug( __METHOD__.": Initialising session for $userName with token $token.\n" ); |
389 | 391 | } else { |
390 | 392 | wfDebug( __METHOD__.": Session already initialised for $userName with token $token.\n" ); |