From: Thomas Gries Date: Sun, 12 Feb 2012 09:13:53 +0000 (+0000) Subject: fix for bug 29135 - please carefully review as it touched the PasswordReset behaviour... X-Git-Tag: 1.31.0-rc.0~24764 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=7a029dd8cb65a728d8798521f9da1edfcea38367;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index b1189ad28e..5e58841573 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -65,6 +65,9 @@ class SpecialPasswordReset extends FormSpecialPage { 'type' => 'text', 'label-message' => 'passwordreset-username', ); + if( $this->getUser()->isLoggedIn() ) { + $a['Username']['default'] = $this->getUser()->getName(); + } } if ( isset( $wgPasswordResetRoutes['email'] ) && $wgPasswordResetRoutes['email'] ) {