Index: trunk/phase3/includes/User.php |
— | — | @@ -646,7 +646,9 @@ |
647 | 647 | return false; |
648 | 648 | |
649 | 649 | # Clean up name according to title rules |
650 | | - $t = Title::newFromText( $name ); |
| 650 | + $t = ($validate === 'valid') ? |
| 651 | + Title::newFromText( $name ) : Title::makeTitle( NS_USER, $name ); |
| 652 | + # Check for invalid titles |
651 | 653 | if( is_null( $t ) ) { |
652 | 654 | return false; |
653 | 655 | } |