The $defaultNamespace parameter to Title::newFromText() only applies if
a namespace prefix isn't included in the text. So if a username was
"Help:FooBar", the NS_USER prefix would not be applied.
Instead use Title::makeTitleSafe( NS_USER, ... ); which was designed for
this specific purpose.
Change-Id: Iafce73d352887947e61ae7c906ddf965e04fbf6f
$this->mShowAll = $showAll;
if ( $userName !== null && $userName !== '' ) {
- $nt = Title::newFromText( $userName, NS_USER );
+ $nt = Title::makeTitleSafe( NS_USER, $userName );
if ( is_null( $nt ) ) {
$this->outputUserDoesNotExist( $userName );
} else {