Cometchat - Avatars Not Showing

Hello all!

I'm new to elgg and I've got things up and running pretty smoothly, aside from one tiny problem. I have installed Cometchat and used the included elgg integration.php file. Unfortunately, the avatars do not work with said integration file, as (from what I can tell) accessing the icondirect.php file requires the joindate variable to work, which the file does not make use of.

function getAvatar($image) {

$str = BASE_URL."../mod/profile/icondirect.php?guid=".$image."&size=medium";

return $str;

This is what is used to get the avatar for Cometchat (as per my integration file). Is there a patch job I can work with? Or does someone happen to have a function for getting the joindate via the guid?

Thanks in advance for any and all help!