31 if ( isset( $params[
'sendConfirmationEmail'] ) ) {
32 $this->sendConfirmationEmail = (bool)$params[
'sendConfirmationEmail'];
34 $this->dbProvider = $dbProvider;
55 $this->sendConfirmationEmail
57 && !$this->manager->getAuthenticationSessionData(
'no-email' )
60 $this->dbProvider->getPrimaryDatabase()->onTransactionCommitOrIdle(
61 function () use ( $user ) {
62 $user = $user->getInstanceFromPrimary() ?? $user;
63 $status = $user->sendConfirmationMail();
64 $user->saveSettings();
65 if ( !$status->isGood() ) {
66 $this->logger->warning(
'Could not send confirmation email: ' .
67 $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()