X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fapi%2FApiResetPassword.php;h=6b1c217017f3f455c4b74378445dfcc7de3a88bf;hb=a1ef77b2d80830fbcb617a83961d78cff9d6e384;hp=a4b51b5e34c8fab66c8021d35915126755309f4d;hpb=3458091bfe2c9602a4ee62724626a884d7e090bf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiResetPassword.php b/includes/api/ApiResetPassword.php index a4b51b5e34..6b1c217017 100644 --- a/includes/api/ApiResetPassword.php +++ b/includes/api/ApiResetPassword.php @@ -1,6 +1,6 @@ + * 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 @@ -21,6 +21,7 @@ */ use MediaWiki\Auth\AuthManager; +use MediaWiki\MediaWikiServices; /** * Reset password, with AuthManager @@ -63,7 +64,11 @@ class ApiResetPassword extends ApiBase { $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() ) {