Merge branch 'MDL-64484-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2019-06-12 20:08:12 +02:00
+2 -1
View 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'));