diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php index 9e430d440d..bc20e13b38 100755 --- a/main/inc/lib/social.lib.php +++ b/main/inc/lib/social.lib.php @@ -1047,6 +1047,10 @@ class SocialManager extends UserManager } $userPicture = $user_info['avatar']; + $officialCode = ''; + if (api_get_setting('show_official_code_whoisonline') == 'true') { + $officialCode .= '

'.$user_info['official_code'].'

'; + } $img = ''.$completeName.''; $url = null; @@ -1068,6 +1072,7 @@ class SocialManager extends UserManager
'.$name.'
+ '.$officialCode.'
'.$status_icon_chat.' '.$user_rol.'
'; diff --git a/main/install/data.sql b/main/install/data.sql index 3705eb9875..6ce381e5f0 100644 --- a/main/install/data.sql +++ b/main/install/data.sql @@ -1875,6 +1875,10 @@ INSERT INTO settings_current (variable, type, category, selected_value, title, c INSERT INTO settings_options (variable, value, display_text) VALUES ('enable_profile_user_address_geolocalization', 'true', 'Yes'); INSERT INTO settings_options (variable, value, display_text) VALUES ('enable_profile_user_address_geolocalization', 'false', 'No'); +INSERT INTO settings_current (variable, type, category, selected_value, title, comment) VALUES ('show_official_code_whoisonline', 'radio', 'User', 'false', 'ShowOfficialCodeInWhoIsOnlinePage', 'ShowOfficialCodeInWhoIsOnlinePageComment'); +INSERT INTO settings_options (variable, value, display_text) VALUES ('show_official_code_whoisonline', 'true', 'Yes'); +INSERT INTO settings_options (variable, value, display_text) VALUES ('show_official_code_whoisonline', 'false', 'No'); + INSERT INTO access_url_rel_course_category (access_url_id, course_category_id) VALUES (1, 1); INSERT INTO access_url_rel_course_category (access_url_id, course_category_id) VALUES (1, 2); INSERT INTO access_url_rel_course_category (access_url_id, course_category_id) VALUES (1, 3);