mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
fix for MDL-8480 external db user lang sync problem
This commit is contained in:
parent
6155150c02
commit
e51917eb12
@ -2433,7 +2433,14 @@ function create_user_record($username, $password, $auth='') {
|
||||
$newuser->auth = (empty($auth)) ? $CFG->auth : $auth;
|
||||
$newuser->username = $username;
|
||||
update_internal_user_password($newuser, $password, false);
|
||||
$newuser->lang = $CFG->lang;
|
||||
|
||||
// fix for MDL-8480
|
||||
// user CFG lang for user if $newuser->lang is empty
|
||||
// or $user->lang is not an installed language
|
||||
$sitelangs = array_keys(get_list_of_languages());
|
||||
if (empty($newuser->lang) || !in_array($newuser->lang, $sitelangs)) {
|
||||
$newuser -> lang = $CFG->lang;
|
||||
}
|
||||
$newuser->confirmed = 1;
|
||||
$newuser->lastip = getremoteaddr();
|
||||
$newuser->timemodified = time();
|
||||
|
Loading…
x
Reference in New Issue
Block a user