Commit 8af3a599 authored by Doris Tam's avatar Doris Tam Committed by Robert Lyon

Bug 1827812: Ensure people receive notifications in their preferred language

'Preferred language' is the language they set in their account settings.

It does not mean that text that is written in a different language is
translated automatically. Only Mahara provided language strings are
of concern here.

Note: Preferred language can be changed if user changes language via
the language switcher before logging in

behatnotneeded

Change-Id: I9eebd522bfc222c0dbfa87c5ca5217f4a50d402b
parent b334637c
......@@ -2923,12 +2923,13 @@ function auth_register_submit(Pieform $form, $values) {
foreach ($admins as $admin) {
$adminuser = new User();
$adminuser->find_by_id($admin);
$ownerlang = get_user_language($adminuser->get('id'));
email_user($adminuser, null,
get_string('pendingregistrationadminemailsubject', 'auth.internal', $institution->displayname, get_config('sitename')),
get_string('pendingregistrationadminemailtext', 'auth.internal',
get_string_from_language($ownerlang, 'pendingregistrationadminemailsubject', 'auth.internal', $institution->displayname, get_config('sitename')),
get_string_from_language($ownerlang, 'pendingregistrationadminemailtext', 'auth.internal',
$adminuser->firstname, $institution->displayname, $pendingregistrationslink,
$expirystring, $fullname, $values['email'], $values['reason'], get_config('sitename')),
get_string('pendingregistrationadminemailhtml', 'auth.internal',
get_string_from_language($ownerlang, 'pendingregistrationadminemailhtml', 'auth.internal',
$adminuser->firstname, $institution->displayname, $pendingregistrationslink, $pendingregistrationslink,
$expirystring, $fullname, $values['email'], $values['reason'], get_config('sitename'))
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment