MDL-34123 use user's lang when sending new emails

This commit is contained in:
Petr Škoda 2012-06-30 20:46:04 +02:00
parent 6be7840ce6
commit 3cbad151af

View File

@ -208,7 +208,7 @@ function cron_run() {
if ($DB->count_records('user_preferences', array('name'=>'create_password', 'value'=>'1'))) {
mtrace('Creating passwords for new users...');
$newusers = $DB->get_recordset_sql("SELECT u.id as id, u.email, u.firstname,
u.lastname, u.username,
u.lastname, u.username, u.lang,
p.id as prefid
FROM {user} u
JOIN {user_preferences} p ON u.id=p.userid