r42756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42755‎ | r42756 | r42757 >
Date:01:36, 29 October 2008
Author:brion
Status:old
Tags:
Comment:
Roll back part of r41435 and following "* Add option to reserve old name (bug 15181)"
We got complaints about it being enabled by default (recently switched off), but it's pretty nasty anyway:
* no logging occurs!
* sets a random password instead of null password
* no way to recover the account within the system should it be done by accident
Modified paths:
  • /trunk/extensions/Renameuser/SpecialRenameuser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Renameuser/SpecialRenameuser_body.php
@@ -54,17 +54,10 @@
5555 // If nothing given for these flags, assume they are checked
5656 // unless this is a POST submission.
5757 $move_checked = true;
58 - $reserve_checked = false;
5958 if( $wgRequest->wasPosted() ) {
6059 if( !$wgRequest->getCheck( 'movepages' ) ) {
6160 $move_checked = false;
6261 }
63 - if( !$wgRequest->getCheck( 'reservename' ) ) {
64 - $reserve_checked = false;
65 - }
66 - else {
67 - $reserve_checked = true;
68 - }
6962 }
7063 $warnings = array();
7164 if( $oun && $nun && !$wgRequest->getCheck( 'confirmaction' ) ) {
@@ -114,16 +107,6 @@
115108 </tr>"
116109 );
117110 }
118 - $wgOut->addHTML( "
119 - <tr>
120 - <td>&nbsp;
121 - </td>
122 - <td class='mw-input'>" .
123 - Xml::checkLabel( wfMsg( 'renameuserreserve' ), 'reservename', 'reservename',
124 - $reserve_checked, array( 'tabindex' => '5' ) ) .
125 - "</td>
126 - </tr>"
127 - );
128111 if( $warnings ) {
129112 $warningsHtml = array();
130113 foreach( $warnings as $warning )
@@ -292,13 +275,6 @@
293276 $log->addEntry( 'renameuser', $oldusername, wfMsgExt( 'renameuser-log', array( 'parsemag', 'content' ),
294277 $wgContLang->formatNum( $contribs ), $reason ), $newusername->getText() );
295278
296 - // Reserve the old name with a random password
297 - if( $wgRequest->getCheck( 'reservename' ) ) {
298 - $p = User::randomPassword();
299 - $user = User::createNew( $olduser->getName() );
300 - $user->setNewpassword( $p );
301 - }
302 -
303279 // Move any user pages
304280 if( $wgRequest->getCheck( 'movepages' ) && $wgUser->isAllowed( 'move' ) ) {
305281 $dbr = wfGetDB( DB_SLAVE );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r41435* Add option to reserve old name (bug 15181)...aaron18:24, 30 September 2008

Status & tagging log