I am trying to get a user id from a users Kunena profile to be able to open a new uddeIM letter with their name already inserted within the message username.
So far I have tried many things but the closest I have gotten is the following:
public function getInboxURL ($userid)
{
static $itemid = false;
if ($itemid === false)
{
$itemid = 0;
if (method_exists($this->uddeim, 'getItemid'))
{
$itemid = $this->uddeim->getItemid();
}
if ($itemid)
{
$itemid = '&Itemid=' . (int) $itemid;
}
else
{
$itemid = '';
}
}
return JRoute::_('index.php?option=com_uddeim&task=new&recip=' . (JFactory::getUser()->id));
}
The only problem is this opens a new letter with MY username as the user.
Please, can someone help?