Fix gravatar in course chat - refs #4507

1.10.x
Imanol Losada 10 years ago
parent 01c93c607b
commit 27ffdcfc1a
  1. 4
      main/chat/chat_functions.lib.php
  2. 5
      main/chat/chat_whoisonline.php

@ -222,6 +222,10 @@ function saveMessage($message, $userId, $_course, $session_id, $group_id, $previ
$userPhoto = $userImage['dir'].$userImage['file'];
}
if (api_get_configuration_value('gravatar_enabled')) {
$userPhoto = $userImage['file'];
}
$filePhoto = '<img class="chat-image" src="'.$userPhoto.'"/>';
if ($isMaster) {

@ -122,6 +122,11 @@ if (!empty($course)) {
} else {
$fileUrl = $userImage['dir'].$userImage['file'];
}
if (api_get_configuration_value('gravatar_enabled')) {
$fileUrl = $userImage['file'];
}
$email = $user['email'];
$url_user_profile=api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$user['user_id'].'&';
?>

Loading…
Cancel
Save