Skip to content
Permalink
Browse files

Add setting "hide_complete_name_in_whoisonline"

To hide name from who is on line BT#14906
  • Loading branch information...
jmontoyaa committed Oct 3, 2018
1 parent acfcfbb commit 60eaebf0866ce5fb25968788cde608df766e5437
Showing with 11 additions and 1 deletion.
  1. +8 −1 main/inc/lib/social.lib.php
  2. +3 −0 main/install/configuration.dist.php
@@ -1282,12 +1282,12 @@ public static function display_user_list($user_list, $wrap = true)
$course_url = '&cidReq='.Security::remove_XSS($_GET['cidReq']);
}
$hide = api_get_configuration_value('hide_complete_name_in_whoisonline');
foreach ($user_list as $uid) {
$user_info = api_get_user_info($uid, true);
$lastname = $user_info['lastname'];
$firstname = $user_info['firstname'];
$completeName = $firstname.', '.$lastname;
$user_rol = $user_info['status'] == 1 ? Display::return_icon('teacher.png', get_lang('Teacher'), null, ICON_SIZE_TINY) : Display::return_icon('user.png', get_lang('Student'), null, ICON_SIZE_TINY);
$status_icon_chat = null;
if (isset($user_info['user_is_online_in_chat']) && $user_info['user_is_online_in_chat'] == 1) {
@@ -1301,6 +1301,13 @@ public static function display_user_list($user_list, $wrap = true)
if (api_get_setting('show_official_code_whoisonline') == 'true') {
$officialCode .= '<div class="items-user-official-code"><p style="min-height: 30px;" title="'.get_lang('OfficialCode').'">'.$user_info['official_code'].'</p></div>';
}
if ($hide === true) {
$completeName = '';
$firstname = '';
$lastname = '';
}
$img = '<img class="img-responsive img-circle" title="'.$completeName.'" alt="'.$completeName.'" src="'.$userPicture.'">';
$url = null;
@@ -972,6 +972,9 @@
// Hide country flags in the language switcher
// $_configuration['hide_flag_language_switcher'] = false;
// Hide complete name in who is online page
// $_configuration['hide_complete_name_in_whoisonline'] = false;
// ------ Custom DB changes (keep this at the end)
// Add user activation by confirmation email
// This option prevents the new user to login in the platform if your account is not confirmed via email

0 comments on commit 60eaebf

Please sign in to comment.
You can’t perform that action at this time.