-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.7.1
-
None
-
MOODLE_27_STABLE
Using an external database for authentication, the task send_new_user_passwords_task fails: "$user->auth" is not setting.
Provisional solution:
At moodle_dir/lib/classes/task/send_new_user_passwords_task.php
Add "u.auth" field at line 55 (SQL)
$newusers = $DB->get_recordset_sql("SELECT u.id as id, u.email,
$usernamefields, u.username, u.lang,
p.id as prefid, u.auth
FROM {user} u
JOIN {user_preferences} p ON u.id=p.userid
WHERE p.name='create_password' AND p.value='1' AND
u.email !='' AND u.suspended = 0 AND
u.auth != 'nologin' AND u.deleted = 0");
Replication steps:
1) Make and poblate an external table for the authentication.
2) Configure Moodle for authentication via external database plugin.
3) Activate debbug messages.
4) Run the script: moodle_dir/auth/db/cli/sync_users.php (by command line or cron)
— All before is OK
5) Run the script: moodle_dir/lib/classes/task/send_new_user_passwords_task.php (FAIL)
- duplicates
-
MDL-46589 Automatic emails not sent after users import from CSV
-
- Closed
-