0

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?

  • I haven't seen the whole setup of how you arrive at this function completely, but the userid appears passed into it. Try using: $userid instead of jfactory get user. – tonypartridge Nov 16 '15 at 21:22
  • Kunena developer said to use $this->profile->userid; but i have tried to throw that in everywhere from the parameter to the return and even in the class.. The whole code is posted here on kunenas forum kunena.org/forum/k-4-0-general-questions/… – brigitte18 Nov 19 '15 at 12:48
0

Ok kunena developer has a hotfix for this uploaded now on github for the next upcomming update release, here is the commit link. https://github.com/Kunena/Kunena-Forum/pull/3547

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.