r105300 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105299‎ | r105300 | r105301 >
Date:15:16, 6 December 2011
Author:reedy
Status:deferred
Tags:
Comment:
Followup r105814
Modified paths:
  • /trunk/extensions/NetworkAuth/NetworkAuth.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NetworkAuth/NetworkAuth.php
@@ -119,20 +119,18 @@
120120 $u = User::newFromName( $wgNetworkAuthUser );
121121 }
122122
123 - if( !is_null( $u ) && !User::isUsableName( $u->getName() ) ) {
124 - if ( !$u->isAnon() ) {
125 - # Finally.
126 - $u->load();
127 - $wgUser = $u;
 123+ if( !is_null( $u ) && User::isUsableName( $u->getName() ) && !$u->isAnon() ) {
 124+ # Finally.
 125+ $u->load();
 126+ $wgUser = $u;
128127
129 - # Since we're not really logged in, just pretending - force a logout
130 - # before the page gets displayed.
131 - global $wgHooks;
132 - $wgHooks['BeforePageDisplay'][] = 'efNetworkAuth_ForceLogout';
 128+ # Since we're not really logged in, just pretending - force a logout
 129+ # before the page gets displayed.
 130+ global $wgHooks;
 131+ $wgHooks['BeforePageDisplay'][] = 'efNetworkAuth_ForceLogout';
133132
134 - # Add a display message to the personal URLs
135 - $wgHooks['PersonalUrls'][] = 'efNetworkAuth_PersonalUrls';
136 - }
 133+ # Add a display message to the personal URLs
 134+ $wgHooks['PersonalUrls'][] = 'efNetworkAuth_PersonalUrls';
137135 }
138136 }
139137 return true;

Status & tagging log