21 private $loadBalancer;
30 if ( isset( $params[
'sendConfirmationEmail'] ) ) {
31 $this->sendConfirmationEmail = (bool)$params[
'sendConfirmationEmail'];
33 $this->loadBalancer = $loadBalancer;
37 if ( $this->sendConfirmationEmail ===
null ) {
53 $this->sendConfirmationEmail
55 && !$this->manager->getAuthenticationSessionData(
'no-email' )
58 $this->loadBalancer->getConnectionRef(
DB_PRIMARY )->onTransactionCommitOrIdle(
59 function () use ( $user ) {
60 $user = $user->getInstanceForUpdate();
61 $status = $user->sendConfirmationMail();
62 $user->saveSettings();
63 if ( !$status->isGood() ) {
64 $this->logger->warning(
'Could not send confirmation email: ' .
65 $status->getWikiText( false, false,
'en' ) );
A class containing constants representing the names of configuration variables.
const EnableEmail
Name constant for the EnableEmail setting, for use with Config::get()
const EmailAuthentication
Name constant for the EmailAuthentication setting, for use with Config::get()