enrol MDL-25522 Fixed up duplicate fields in search_other_users method that was causi...
authorSam Hemelryk <sam@moodle.com>
Thu, 6 Jan 2011 02:20:28 +0000 (10:20 +0800)
committerSam Hemelryk <sam@moodle.com>
Thu, 6 Jan 2011 02:20:28 +0000 (10:20 +0800)
enrol/locallib.php

index 83aebf4..dcf4bb7 100644 (file)
@@ -331,8 +331,7 @@ class course_enrolment_manager {
         }
         $wherecondition = implode(' AND ', $tests);
 
-
-        $fields      = 'SELECT u.id, u.firstname, u.lastname, u.username, u.email, u.lastaccess, u.picture, u.imagealt, '.user_picture::fields('u');;
+        $fields      = 'SELECT '.user_picture::fields('u', array('username','lastaccess'));
         $countfields = 'SELECT COUNT(u.id)';
         $sql   = " FROM {user} u
                   WHERE $wherecondition