Commit ac434eff authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Merge "Bug 1538225: Respect user's lang preference when adding to institution"

parents c4061514 2a0fd12b
......@@ -296,8 +296,12 @@ class Institution {
if (is_numeric($user)) {
$user = get_record('usr', 'id', $user);
}
// The user hasn't been added yet, so we have to manually use this institution's lang
if ($this->lang != 'default') {
if ($lang = get_account_preference($user->id, 'lang')) {
// The user has a preset lang preference so we will use this
}
else if ($this->lang != 'default') {
// The user hasn't been added yet, so we have to manually use this institution's lang
$lang = $this->lang;
}
else {
......
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