Index: trunk/extensions/NetworkAuth/NetworkAuth.php |
— | — | @@ -119,20 +119,18 @@ |
120 | 120 | $u = User::newFromName( $wgNetworkAuthUser ); |
121 | 121 | } |
122 | 122 | |
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; |
128 | 127 | |
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'; |
133 | 132 | |
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'; |
137 | 135 | } |
138 | 136 | } |
139 | 137 | return true; |