Index: trunk/phase3/includes/User.php |
— | — | @@ -904,6 +904,13 @@ |
905 | 905 | return false; |
906 | 906 | } |
907 | 907 | |
| 908 | + global $wgBlockDisablesLogin; |
| 909 | + if( $wgBlockDisablesLogin && $this->isBlocked() ) { |
| 910 | + # User blocked and we've disabled blocked user logins |
| 911 | + $this->loadDefaults(); |
| 912 | + return false; |
| 913 | + } |
| 914 | + |
908 | 915 | if ( isset( $_SESSION['wsToken'] ) ) { |
909 | 916 | $passwordCorrect = $_SESSION['wsToken'] == $this->mToken; |
910 | 917 | $from = 'session'; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1343,8 +1343,16 @@ |
1344 | 1344 | 'IPv4' => 16, # Blocks larger than a /16 (64k addresses) will not be allowed |
1345 | 1345 | 'IPv6' => 64, # 2^64 = ~1.8x10^19 addresses |
1346 | 1346 | ); |
1347 | | -$wgBlockDisablesLogin = false; # If true, blocked users will not be allowed to login |
1348 | 1347 | |
| 1348 | +/** |
| 1349 | + * If true, blocked users will not be allowed to login. When using this with |
| 1350 | + * a public wiki, the effect of logging out blocked users may actually be |
| 1351 | + * avers: unless the user's address is also blocked (e.g. auto-block), |
| 1352 | + * logging the user out will again allow reading and editing, just as for |
| 1353 | + * anonymous visitors. |
| 1354 | + */ |
| 1355 | +$wgBlockDisablesLogin = false; # |
| 1356 | + |
1349 | 1357 | # Pages anonymous user may see as an array, e.g.: |
1350 | 1358 | # array ( "Main Page", "Wikipedia:Help"); |
1351 | 1359 | # Special:Userlogin and Special:Resetpass are always whitelisted. |