Topic on Project:Support desk

Why is the confirmaccount-email-body not used when account is approved

4
Ken Roy (talkcontribs)

Why is the confirmaccount-email-body text in the language.json files not used when the account is approved?

The extensions/ConfirmAccount/i18n/confirmaccount/en.json file at line 82 has

   "confirmaccount-email-body": "Your request for an account has been approved on MediaWiki.\n\nAccount name: $1\n\nPassword: $2\n\nFor security reasons you will need to change your password on first login.\nTo login, please go to //www.mediawiki.org/wiki/Special:UserLogin.",

Looks like the site variables were substituted in the above text. I change the message in the extensions/ConfirmAccount/i18n/confirmaccount/en.json with a change control system to tailor it for our wiki and want to tailor it of other languages but the message that is sent is in English only and starts with

"The account you requested for this email address on TNG Wiki...."

where does this message come from and how can I get it displayed in the language used by the user when requesting an account?

Ken Roy (talkcontribs)

Looks like the account created email message is coming from the wiki/languages/i18n/en.json file

"createaccount-text": "The account you requested for this email address on MediaWiki ($4) named \"$2\", with a temporary password \"$3\" has been created.\nYou should log in and change your password now.\n\nYou may ignore this message, if this account was created in error.",

and is being issued by the wiki/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php

in the function sendNewAccountEmail

It also appears that the following instruction

       $userLanguage = $user->getOption( 'language' );

does not get the language used by the user when Registering for a Username

Why is the ConfirmAccount not issuing the email?

Ken Roy (talkcontribs)
Ken Roy (talkcontribs)

Mea culpa,

It is heck getting old and upgrading MediaWiki software only every 3 years or so. I completely forgot that I had changed that message when I upgraded to MW 1.27.3

It would be nice though if the account approved email came from the ConfirmAccount extension confirmaccount-email-body message instead the generic createaccount-text in the wiki/languages/i18n json files

Reply to "Why is the confirmaccount-email-body not used when account is approved"