public function _getURL($user, $sizex, $sizey) { if (!$user->userid == 0) { $user = KunenaFactory::getUser($user->userid); $user = JsnHelper::getUser($user->userid); if ($sizex <= 50) { $avatar = JURI::root(true) . '/' . $user->getValue('avatar_mini'); } else { $avatar = JURI::root(true) . '/' . $user->getValue('avatar'); } } elseif ($this->params->get('guestavatar', "easyprofile") == "easyprofile") { $avatar = JUri::root(true) . '/components/com_jsn/assets/img/default.jpg'; } else { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('params')->from('#__jsn_fields')->where('alias=\'avatar\''); $db->setQuery($query); $params = $db->loadResult(); $registry = new JRegistry(); $registry->loadString($params); $params = $registry->toArray(); if ($params['image_defaultvalue'] != "") { $avatar = JUri::root(true) . '/' . $params['image_defaultvalue']; } else { $avatar = JUri::root(true) . '/components/com_jsn/assets/img/default.jpg'; } } return $avatar; }
public function getProfileURL($userid, $task = '', $xhtml = true) { //Make sure that user profile exist. if (!$userid || JsnHelper::getUser($userid) === null) { return false; } $user = JsnHelper::getUser($userid); return $user->getLink(); }