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

Create password user option fails to get actioned when using postgres

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6
    • Fix Version/s: None
    • Component/s: Administration
    • Labels:
      None
    • Environment:
      Linux + Postgres
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Hi,

      The create password option fails to get actioned by the admin/cron.php script when running on Postgres. This can be replicated when uploading users and selecting "Create password if needed" for the New User Password setting.

      When the cron executes there is a query in the admin/cron.php file (approx line 350) which fails on the following where:
      WHERE p.name='create_password' AND p.value=1 AND u.email !=''
      to keep postgres happy the 1 should have quotes like so:
      WHERE p.name='create_password' AND p.value='1' AND u.email !='' "

      I have attached a patch with resolves the above.

      Cheers,
      Luke

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                poltawski Dan Poltawski
                Reporter:
                luketucker Luke Tucker
                Participants:
                Component watchers:
                Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: