Translations of this page:

Customising user profile pages

This is applicable starting from Claromentis version 5.3

Fields list for pages viewprofile, editmyprofile and peopleadmin_edituser are configured only in config file. Before 5.3 this was partially available - only for standard fields, but not for metadata. Also fields order had no effect - they were shown as listed in html template.

Now, for each of these three pages:

  • All fields are listed in config file. Metadata and standard fields can be mixed in one list and they are shown in exactly that order as listed in config file. Metadata fields are included by their key with prefix [m].
  • If there is a metadata in list, but no corresponding metadata field prototype is found in users’ metadata set, this field is silently skipped and ignored. It doesn’t appear in fields list and doesn’t trigger any errors.
  • If there is a metadata in list that has prototype and limited access (for example, system flag or admin_editable), then usual visibility rights are applied. I.e. system metadata are not displayed at all. Admin-only metadata are displayed for editing in admin area and show readonly current value in user’s area (on myprofile page).

Editing Config File

Fields to show and listing can be customized by modifying entry in the config file

Always Remember to copy value from /intranet/common/config_default.php to /intranet/common/config.php and begin modification to avoid changes be overwritten during upgrade process

Changing Photo Size

The size of the user’s photo can be changed by altering width and height value.

Default value is 80x80px.

// Size of userpic used for displaying in MyProfile and Admin > EditUser pages
$cfg_user_profile_image_width = 80;
$cfg_user_profile_image_height = 80;

Search only by Name

By default searching people will be done by keywords which include all text string stored against user profile. Changing value from false to yes will enable search by name only.

// Search people by name only (in contrast to searching by all metadata as well)
$cfg_people_search_by_full_name_only = false;

List People Fields

/intranet/people/listpeople.php

// Show this fields in listpeople.php:
// $cfg_listpeople_show_fields must be array of needed fields, order matters
// Available fields: username, firstname, surname, job_title, city, landline, mobile, emailad, pref_contact, company,
// work_location, usercomments, career, interests, role, group, ex_area_id, user_code, name, photo
// Metadata fields should be specified with prefix [m] (i.e. "[m]usr_rank")
$cfg_listpeople_show_fields = array("photo", "name", "role", "group", "emailad", "ex_area_id");

My Profile

/intranet/people/myprofile.php

The page where users can edit their own profile

// Show and edit this fields in myprofile.php:
// $cfg_myprofile_fields must be array of needed fields
// Visible metadata fields not listed in this array are automatically added at the end of this list.
// add "group" or "role" to show list of groups/roles (readonly)
$cfg_myprofile_fields = array(
		"firstname",
		"surname",
		"emailad",
		"landline",
		"mobile",
		"pref_contact",
		"city",
		"company",
		"job_title",
		"work_location",
		"usercomments",
		"career",
		"interests",
		"skills",
		"photo"
	);

Admin Edit User

/intranet/panels/peopleadmin_edituser.php

People admin panel page to edit user details

// Show and edit this fields in peopleadmin_edituser.php:
// $cfg_edituser_fields must be array of needed fields
// Available fields: intranetuser, surname, firstname, company, work_location, city, emailad, landline, mobile, pref_contact, ex_area_id,
//   usercomments, job_title, user_code, contract_type, username, password, last_time_login, password_policy, photo, skin,
//   notification_method (instant message/email/both), what_to_show (whats new/easy find settings), career, interests
// Metadata fields should be specified with prefix [m] (i.e. "[m]usr_rank")
// Visible metadata fields not listed in this array are automatically added at the end of this list.
$cfg_edituser_fields = array(
		"last_time_login",
		"user_code",
		"username",
		"password",
		"intranetuser",
		"surname",
		"firstname",
		"company",
		"job_title",
		"work_location",
		"city",
		"emailad",
		"landline",
		"mobile",
		"usercomments",
		"pref_contact",
		"contract_type",
		"ex_area_id",
		"security_level",
		"what_to_show",
		"password_policy",
		"photo",
		"skin"
	);

My Settings

/intranet/people/mysettings.php

The page where users can change their settings.

 
// Show and edit this fields in mysettings.php:
// $cfg_mysettings_fields must be array of needed fields
// Default fields are listed below:
$cfg_mysettings_fields = array(
		"what_to_show",
		"notification_method",
		"notify_on_checkout",
		"notify_on_checkin",
		"language",
		"skin",
		"xchng_server",
		"xchng_username",
		"xchng_domain",
		"xchng_password",
		"xchng_gc_time"
	);

View Profile

/intranet/people/viewprofiles.php

The page where users viewing someone elses profile.

 
// Show this fields in viewprofile.php:
// $cfg_viewprofile_fields must be array of needed fields
// Visible metadata fields not listed in this array are automatically added at the end of this list.
// add "group" or "role" to show list of groups/roles
// Default fields are listed below:
$cfg_viewprofile_fields = array(
		"photo",
		"name",
		"company",
		"job_title",
		"city",
		"work_location",
		"emailad",
		"landline",
		"mobile",
		"usercomments",
		"pref_contact",
		"skills",
		"career",
		"interests"
	);

User Profile Expiration

Notification about user profile expiration.

To notify users if they don’t undate their profile for a long time, specify user metadata field here. This field will contain the date when profile was updated the last time. Leave unset to not to use this function. If its needed to dispay this field on people profile page or make editable in admin area, need to add description of that field in Metadata admin panel.

Key: pick key other than “usr_profile_last_updated” and set $cfg_profile_last_updated_field = this key

Title: pick title (i.e. “Profile Last Updated”)

Type: “datetime”

you can’t create metadata field with key “usr_profile_last_updated”, it is system metadata

 
// (note that field type must be "datetime")
$cfg_profile_last_updated_field = ""; // "usr_profile_last_updated";
 
// after this period of time user profile become outdated (days)
$cfg_profile_default_notification_period = 30;
 
// after user profile became outdated and has not been updated by user, send notification again every ... days
$cfg_profile_default_notification_interval = 2;
 
customisation/people/profile_page.txt · Last modified: 07/06/2011 04:49 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki