function getUserAvatar($integration_option, $user) { $activitysocialintegrationprofiledata = new activitysocialintegrationprofiledata(); $useremail = $user->email; $userid = $user->id; $uimage = ''; if ($integration_option == "Joomla") { $uimage = $activitysocialintegrationprofiledata->get_gravatar($useremail, '40', 'mm', 'g'); } else { if ($integration_option == "Community Builder") { $installed = $activitysocialintegrationprofiledata->Checkifinstalled('com_comprofiler'); if ($installed) { $uimage = $activitysocialintegrationprofiledata->getCBUserAvatar($userid); } } else { if ($integration_option == "JomSocial") { $installed = $activitysocialintegrationprofiledata->Checkifinstalled('com_community'); if ($installed) { $uimage = $activitysocialintegrationprofiledata->getJomsocialUserAvatar($userid); } } else { if ($integration_option == "Jomwall") { $installed = $activitysocialintegrationprofiledata->Checkifinstalled('com_awdwall'); if ($installed) { $uimage = $activitysocialintegrationprofiledata->getJomwallUserAvatar($userid); } } else { if ($integration_option == "EasySocial") { $installed = $activitysocialintegrationprofiledata->Checkifinstalled('com_easysocial'); if ($installed) { $uimage = $activitysocialintegrationprofiledata->getEasySocialUserAvatar($userid); } } } } } } return $uimage; }