MDL-43451 Cron: Retrieve additional name fields when creating passwords
This commit is contained in:
+3
-2
@@ -223,8 +223,9 @@ function cron_run() {
|
||||
// Generate new password emails for users - ppl expect these generated asap
|
||||
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.lang,
|
||||
$usernamefields = get_all_user_name_fields(true, 'u');
|
||||
$newusers = $DB->get_recordset_sql("SELECT u.id as id, u.email,
|
||||
$usernamefields, u.username, u.lang,
|
||||
p.id as prefid
|
||||
FROM {user} u
|
||||
JOIN {user_preferences} p ON u.id=p.userid
|
||||
|
||||
Reference in New Issue
Block a user