Merge branch 'MDL-37810-master-fix' of https://github.com/snake/moodle
authorJun Pataleta <jun@moodle.com>
Fri, 22 Sep 2017 02:54:40 +0000 (10:54 +0800)
committerJun Pataleta <jun@moodle.com>
Fri, 22 Sep 2017 02:54:40 +0000 (10:54 +0800)
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