r111287 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111286‎ | r111287 | r111288 >
Date:09:13, 12 February 2012
Author:wikinaut
Status:ok
Tags:
Comment:
fix for bug 29135 - please carefully review as it touched the PasswordReset behaviour. Aashish's fix only presets the PasswordReset username field with the logged-in username. This is exactly what users want when they reset their own password via mail. It is also needed by OpenID extension to allow OpenID-only logged-in users to create a regular password for several purposes and security.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPasswordReset.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPasswordReset.php
@@ -65,6 +65,9 @@
6666 'type' => 'text',
6767 'label-message' => 'passwordreset-username',
6868 );
 69+ if( $this->getUser()->isLoggedIn() ) {
 70+ $a['Username']['default'] = $this->getUser()->getName();
 71+ }
6972 }
7073
7174 if ( isset( $wgPasswordResetRoutes['email'] ) && $wgPasswordResetRoutes['email'] ) {

Status & tagging log