Skip to content

Commit 4a4b4e2

Browse files
committed
Merge branch 'MDL-64484-37' of https://github.com/paulholden/moodle into MOODLE_37_STABLE
2 parents 9a7a447 + ea770fe commit 4a4b4e2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

user/filters/profilefield.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,12 @@ public function get_operators() {
7474
*/
7575
public function get_profile_fields() {
7676
global $DB;
77-
if (!$fields = $DB->get_records('user_info_field', null, 'shortname', 'id,shortname')) {
77+
if (!$fields = $DB->get_records_menu('user_info_field', null, 'name', 'id, name')) {
7878
return null;
7979
}
8080
$res = array(0 => get_string('anyfield', 'filters'));
81-
foreach ($fields as $k => $v) {
82-
$res[$k] = $v->shortname;
83-
}
84-
return $res;
81+
82+
return $res + $fields;
8583
}
8684

8785
/**

0 commit comments

Comments
 (0)