r36812 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36811‎ | r36812 | r36813 >
Date:10:40, 30 June 2008
Author:werdna
Status:old
Tags:
Comment:
Fix fatal error on account creation
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php
@@ -69,7 +69,7 @@
7070 return $filter_result == '' || $filter_result === true;
7171 }
7272
73 - function onAbortNewAccount( $username, &$message ) {
 73+ function onAbortNewAccount( $user, &$message ) {
7474 wfLoadExtensionMessages( 'AbuseFilter' );
7575 if ($username == wfMsgForContent( 'abusefilter-blocker' )) {
7676 $message = wfMsg( 'abusefilter-accountreserved' );
@@ -78,7 +78,7 @@
7979 $vars = array();
8080
8181 $vars['ACTION'] = 'createaccount';
82 - $vars['ACCOUNTNAME'] = $vars['USER_NAME'] = $username;
 82+ $vars['ACCOUNTNAME'] = $vars['USER_NAME'] = $user->getName();
8383
8484 $filter_result = AbuseFilter::filterAction( $vars, SpecialPage::getTitleFor( 'Userlogin' ) );
8585

Status & tagging log