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?

2
  • 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. Nov 16, 2015 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, 2015 at 12:48

1 Answer 1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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