Merge branch 'MDL-53169' of https://github.com/stronk7/moodle
authorDan Poltawski <dan@moodle.com>
Thu, 21 Sep 2017 18:03:55 +0000 (19:03 +0100)
committerDan Poltawski <dan@moodle.com>
Thu, 21 Sep 2017 18:03:55 +0000 (19:03 +0100)
lib/enrollib.php

index e23eb1a..6077d59 100644 (file)
@@ -658,7 +658,8 @@ function enrol_get_my_courses($fields = null, $sort = 'visible DESC,sortorder AS
             $courseidsql .= "
                     SELECT DISTINCT e.courseid
                       FROM {enrol} e
-                     WHERE e.enrol = 'guest' AND e.password = '' AND e.status = :enabled2";
+                     WHERE e.enrol = 'guest' AND e.password = :emptypass AND e.status = :enabled2";
+            $params['emptypass'] = '';
             $params['enabled2'] = ENROL_INSTANCE_ENABLED;
 
             // Include courses where the current user is currently using guest access (may include