<?php
/**
- * Copyright © 2016 Brad Jorsch <bjorsch@wikimedia.org>
+ * Copyright © 2016 Wikimedia Foundation and contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
use MediaWiki\Auth\AuthManager;
+use MediaWiki\MediaWikiServices;
/**
* Reset password, with AuthManager
$this->requireOnlyOneParameter( $params, 'user', 'email' );
- $passwordReset = new PasswordReset( $this->getConfig(), AuthManager::singleton() );
+ $passwordReset = new PasswordReset(
+ $this->getConfig(),
+ AuthManager::singleton(),
+ MediaWikiServices::getInstance()->getPermissionManager()
+ );
$status = $passwordReset->isAllowed( $this->getUser() );
if ( !$status->isOK() ) {