Page MenuHomePhabricator

TemporaryPasswordPrimaryAuthenticationProvider does not use the language that the request was created in
Open, Needs TriagePublic


The wiki/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php not use the language that the request was created in

The following at lines 445-446

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

$subjectMessage = wfMessage( 'createaccount-title' )->inLanguage( $userLanguage );

but the request approved email is being issued in English only - the wiki's language.

See on Support Desk for original description of the problem

Event Timeline

Its generally expected that an extension will change the user's language if appropriate. By default the user's language will be the content language not the request language.

Hmm, I guess that means this task should be declined because it's intentional behavior?

If you think that is intentional behavior, then some information should be provided on how I need to modify the code so that the correct language can be selected to send the email in the user's language and not in the wiki language.

Or the ConfirmAccount extension should be changed to provide the Account Approved request and not let it be sent by a generic catchall function that does not work correctly

Maybe the ConfirmAccount extension should be enhanced to save the user's language preference and also to send the account approved email using the user's language preference which if not provided would default to the wiki language