*/
private $result;
+ /**
+ * @var string $method Identifies which password reset field was specified by the user.
+ */
+ private $method;
+
public function __construct() {
parent::__construct( 'PasswordReset', 'editmyprivateinfo' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function userCanExecute( User $user ) {
return $this->canChangePassword( $user ) === true && parent::userCanExecute( $user );
}
return array( $error );
}
+ $this->method = $method;
+
if ( count( $users ) == 0 ) {
if ( $method == 'email' ) {
// Don't reveal whether or not an email address is in use
$this->getOutput()->addHTML( Html::rawElement( 'pre', array(), $this->email->escaped() ) );
}
- $this->getOutput()->addWikiMsg( 'passwordreset-emailsent' );
+ if ( $this->method === 'email' ) {
+ $this->getOutput()->addWikiMsg( 'passwordreset-emailsentemail' );
+ } else {
+ $this->getOutput()->addWikiMsg( 'passwordreset-emailsentusername' );
+ }
+
$this->getOutput()->returnToMain();
}