*/
use MediaWiki\Auth\AuthManager;
+use MediaWiki\MediaWikiServices;
/**
* Special page for requesting a password reset email.
private function getPasswordReset() {
if ( $this->passwordReset === null ) {
- $this->passwordReset = new PasswordReset( $this->getConfig(), AuthManager::singleton() );
+ $this->passwordReset = new PasswordReset(
+ $this->getConfig(),
+ AuthManager::singleton(),
+ MediaWikiServices::getInstance()->getPermissionManager()
+ );
}
return $this->passwordReset;
}
$a = [];
if ( isset( $resetRoutes['username'] ) && $resetRoutes['username'] ) {
$a['Username'] = [
- 'type' => 'user',
+ 'type' => 'text',
+ 'default' => $this->getRequest()->getSession()->suggestLoginUsername(),
'label-message' => 'passwordreset-username',
];