In the back-end configuration, you might set the Kunena to display either user-name or display-name. Anyhow, Kunena takes this setting in effect ONLY in the thread view.
In Categories-view or Forum-view, it will certainly be user-name on the page.
After all it is a security issue as well: user-name is exposed and the rest step is to guess the password.
I found this issue and solved it by myself. here is the code in
Kunena.link.class.php - > function GetProfileLink
Code:
function GetProfileLink($fbConfig, $userid, $name, $rel='nofollow', $class='')
{
$fbConfig =& CKunenaConfig::getInstance();
// Only create links for valid users
if ($userid > 0)
{
// query filter that might help to reduce sql load
$keyword='=';
// when $name is conducted as a link or anything non-name, there would be a "=". It might NOT be the most precise one , but during the test it appears to be the most obvious mark for me.
if (strpos($name,$keyword)=== false) // notice: it is "===".
{ // all the vars are essential. Load Joomla user info.
if ($fbConfig->username) { $fb_queryName = "username"; }
else { $fb_queryName = "name"; }
$kunena_db = &JFactory::getDBO();
$kunena_db->setQuery("SELECT b.name, b.username, b.gid FROM #__fb_users AS a LEFT JOIN #__users AS b ON b.id=a.userid WHERE a.userid='{$userid}'");
check_dberror("Unable to load name query.");
// in some case this query cannot make it, especially when the database (user tables) for joomla and Kunena is not synchronized. And since this script is currently made by me, not an official release, it is useful to keep free of bugs as well.
if ($userinfo == NULL) {
// induced/copy from view.php. I think this should be NULL, but I haven't reviewed all the source code.
$userinfo = new stdClass(); $userinfo->userid = 0;$userinfo->name = ''; $userinfo->username = '';
}
$userinfo = $kunena_db->loadObject();
// For furture Compatibility:components (other than Kunena) might call this function for links to either display name or username, but you need a certain one.
// also this helps to make this fuction more soild and reliable.
if (($name==$userinfo->name)or($name==$userinfo->username)) {$name = $userinfo->$fb_queryName;}
unset($kunena_db,$userinfo,$fb_queryName,$keyword);
} // replace
if($fbConfig->fb_profile == 'cb')
{
$kunenaProfile =& CKunenaCBProfile::getInstance();
if ($link = $kunenaProfile->getProfileURL($userid))
{
return CKunenaLink::GetSefHrefLink($link, $name, '', $rel, $class);
}
else
{
return $name;
}
} else {
return CKunenaLink::GetSefHrefLink(KUNENA_PROFILE_LINK_SUFFIX.$userid, $name, '', $rel, $class);
}
}
else // supress links for guests
{
return $name;
}
}
Requirement : php-extension
mbstring must be enabled, in which strpos() is described.
You can safely replace the function with mine. Anything I changed is commented within the code.