Commit f91fbf0a authored by Aaron Wells's avatar Aaron Wells

Fixes an "undefined index" warning on the account settings page

Bug 1311963. The call to get_records_assoc() assumes that institution.name
will be the first column returned. But we've added an institution.id column
that comes before that, so now we need to specifically tell it to use the
name column instead.

Change-Id: I51ef6e805b80894fa6af7bc732fb241adac0fdec
parent 04ff27b2
......@@ -654,7 +654,7 @@ if ( !$USER->get('admin') ) { // for institution admins
$institutions = array_intersect_key($institutions, $admin_institutions);
}
$allinstitutions = get_records_assoc('institution', '', '', 'displayname');
$allinstitutions = get_records_assoc('institution', '', '', 'displayname', 'name, displayname');
foreach ($institutions as $i) {
$elements[$i->institution.'_settings'] = array(
'type' => 'fieldset',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment