X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiResetPassword.php;h=6b1c217017f3f455c4b74378445dfcc7de3a88bf;hp=77838269b4937b25b00d4f6fbdd4e86033a5e5cc;hb=a1ef77b2d80830fbcb617a83961d78cff9d6e384;hpb=89539f2aa1b158fdcc703ad053e2580cb97a6385 diff --git a/includes/api/ApiResetPassword.php b/includes/api/ApiResetPassword.php index 77838269b4..6b1c217017 100644 --- a/includes/api/ApiResetPassword.php +++ b/includes/api/ApiResetPassword.php @@ -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() ) {