Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.8.9, 1.9.5
-
Fix Version/s: None
-
Component/s: Administration, Authentication, Database SQL/XMLDB
-
Labels:None
-
Environment:Found using Moodle with PostgreSQL 8.3 - will also be a problem for any other SQL-92 compliant RDBMS that does not like implicit type casts.
-
Database:PostgreSQL
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
The code in admin/cron.php to email out new passwords to users currently compares a text field to an integer, which is an implicit type cast that results in an error in PostgreSQL 8.3 or higher. Quoting the integer fixes the problem:
WHERE p.name='create_password' AND p.value=1 AND u.email !=''
should be
WHERE p.name='create_password' AND p.value='1' AND u.email !=''
Issue Links
| This issue is duplicated by: | ||||
| MDL-20967 | Create password user option fails to get actioned when using postgres |
|
|
|
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Applied trivial patch to HEAD, MOODLE_19_STABLE and MOODLE_18_STABLE.