*/
private $permissionCache;
- public static $constructorOptions = [
+ public const CONSTRUCTOR_OPTIONS = [
'AllowRequiringEmailForResets',
'EnableEmail',
'PasswordResetRoutes',
* @param User $performingUser The user that does the password reset
* @param string|null $username The user whose password is reset
* @param string|null $email Alternative way to specify the user
- * @return StatusValue Will contain the passwords as a username => password array if the
- * $displayPassword flag was set
+ * @return StatusValue
* @throws LogicException When the user is not allowed to perform the action
* @throws MWException On unexpected DB errors
*/
'requestingUser' => $performingUser->getName(),
'targetUsername' => $username,
'targetEmail' => $email,
- 'actualUser' => $firstUser->getName(),
];
if ( !$result->isGood() ) {
return $result;
}
- $passwords = [];
- foreach ( $reqs as $req ) {
- // This is adding a new temporary password, not intentionally changing anything
- // (even though it might technically invalidate an old temporary password).
- $this->authManager->changeAuthenticationData( $req, /* $isAddition */ true );
- }
-
- $this->logger->info(
- "{requestingUser} did password reset of {actualUser}",
- $logContext
+ DeferredUpdates::addUpdate(
+ new SendPasswordResetEmailUpdate( $this->authManager, $reqs, $logContext ),
+ DeferredUpdates::POSTSEND
);
- return StatusValue::newGood( $passwords );
+ return StatusValue::newGood();
}
/**