Merge branch 'MDL-64484' of https://github.com/paulholden/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 12 Jun 2019 17:43:52 +0000 (19:43 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 12 Jun 2019 17:43:52 +0000 (19:43 +0200)
user/filters/profilefield.php

index 2ae5f54..65723be 100644 (file)
@@ -74,7 +74,8 @@ class user_filter_profilefield extends user_filter_type {
      */
     public function get_profile_fields() {
         global $DB;
-        if (!$fields = $DB->get_records_menu('user_info_field', null, 'name', 'id, name')) {
+        $order = $DB->sql_order_by_text('name');
+        if (!$fields = $DB->get_records_menu('user_info_field', null, $order, 'id, name')) {
             return null;
         }
         $res = array(0 => get_string('anyfield', 'filters'));