Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-46420

send new user passwords task fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.7.1
    • Authentication
    • 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)

            Unassigned Unassigned
            miguelaf Miguel González
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.