Moodle

Create password user option fails to get actioned when using postgres

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor 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

Issue Links

Activity

Hide
Dan Poltawski added a comment -

This was fixed already in MDL-20114

Show
Dan Poltawski added a comment - This was fixed already in MDL-20114

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: