translations
* (bug 11211) Pass, as a parameter to the protectedpagetext interface
message, the level of protection.
+* (bug 9611) Supply the blocker and reason for the cantcreateaccounttext
+ message.
=== API changes in 1.12 ===
return false;
}
- # Check anonymous user ($wgUser) limitations :
+ #Â Check anonymous user ($wgUser) limitations :
if (!$wgUser->isAllowedToCreateAccount()) {
$this->userNotPrivilegedMessage();
return false;
/** */
function userBlockedMessage() {
- global $wgOut;
+ global $wgOut, $wgUser;
# Let's be nice about this, it's likely that this feature will be used
# for blocking large numbers of innocent people, e.g. range blocks on
$wgOut->setArticleRelated( false );
$ip = wfGetIP();
- $wgOut->addWikiText( wfMsg( 'cantcreateaccounttext', $ip ) );
+ $blocker = User::whoIs($wgUser->mBlock->mBy);
+ $block_reason = $wgUser->mBlock->mReason;
+
+ $wgOut->addWikiText( wfMsg( 'cantcreateaccounttext', $ip, $block_reason, $blocker ) );
$wgOut->returnToMain( false );
}