diff --git a/main/chat/chat_message.php b/main/chat/chat_message.php index a1d7c209a5..86355b274a 100755 --- a/main/chat/chat_message.php +++ b/main/chat/chat_message.php @@ -216,7 +216,11 @@ if (!empty($course) && !empty($_user['user_id'])) { $fp = fopen($chat_path.$basename_chat.'.log.html', 'a'); // view user picture $userImage = UserManager::get_user_picture_path_by_id($user_id, 'web', false, true); - $userPhoto = $userImage['dir'].'medium_'.$userImage['file']; + if (substr($userImage['file'],0,7) != 'unknown') { + $userPhoto = $userImage['dir'].'medium_'.$userImage['file']; + } else { + $userPhoto = $userImage['dir'].$userImage['file']; + } $filePhoto = ''; if ($isMaster) {