Showing additional fields on user profile page

The fields displayed on the user profile page (public profile) are controlled by the code in lib/myprofilelib.php. You'll find there is logic in there that checks for certain configuration settings.

For example, if you wanted to show the phone number (phone1), mobile phone (phone2) and id number fields (idnumber), there is a setting under the function core_myprofile_navigation that determines which contact details to show using the data in the configuration variable $CFG->showuseridentity.

This can be set in the site administration area under:

Site administration > Users > Permissions > User Policies

You could also set the value of this in config file as $CFG->showuseridentity as a string of comma separate values e.g.

$CFG->showuseridentity = 'phone1,phone2,idnumber';

Sometimes these settings are hard to find the Site administration user interface, until you have a look in the code and then search for the relevant configuration item like showuseridentity.

No Comments
Back to top