MDL-50962 user: Profile fields display properly
authorBruce Silver <beanbiscuit@gmail.com>
Mon, 17 Aug 2015 02:30:47 +0000 (10:30 +0800)
committerAdrian Greeve <adrian@moodle.com>
Mon, 17 Aug 2015 02:33:05 +0000 (10:33 +0800)
The department and idnumber fields were not displaying
properly on the user profile pages.

lib/myprofilelib.php

index a00b5ec..e013d6d 100644 (file)
@@ -192,13 +192,13 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user,
 
     if (isset($identityfields['department']) && $user->department) {
         $node = new core_user\output\myprofile\node('contact', 'department', get_string('department'), null, null,
-            $user->institution);
+            $user->department);
         $tree->add_node($node);
     }
 
     if (isset($identityfields['idnumber']) && $user->idnumber) {
         $node = new core_user\output\myprofile\node('contact', 'idnumber', get_string('idnumber'), null, null,
-            $user->institution);
+            $user->idnumber);
         $tree->add_node($node);
     }