×
K5.1.1 is released (10 Jun 2018)

The Kunena team is pleased to announce Kunena 5.1.1 [K 5.1.1].
Please read the blog post for information:

× Topics must relate to a currently supported version of Kunena. If you are unsure what is the current supported version of Kunena, please go to the download page.

If you are having problems then, for your own benefit, it would save us all a lot of time if you would kindly post your configuration report when you ask for help from this forum. If you do not post your configuration report we will not ask you for it but you will probably not get your problem solved, either.

Question Userstate in Postprofile (Left) is always online

More
10 months 3 weeks ago #1 by Razen
Hello,

in my installation of Kunema, the state of the user in the post-profile is always online, event if the player is offline since days.
I already checked the cache and some settings mentioned in other threads here, but I didnt find anything.

I also went looking into the templates and found this code in the template user/profile/default.php:
<?php if ($user->exists()) : ?>
	<li>
		<?php echo $this->subLayout('User/Item/Status')->set('user', $user); ?>
	</li>
	<?php endif; ?>

If I'm right that refers to user/item/status/default.php:
defined('_JEXEC') or die;
 
$user = isset($this->user) ? $this->user : KunenaUserHelper::getMyself();
$status = $user->getStatus();
$status_text = $user->getStatusText();
$link = $user->getURL();
 
switch ($status)
{
	case 0:
		$label = JText::_("COM_KUNENA_ONLINE");
		$state = "success";
		break;
	case 1:
		$label = JText::_("COM_KUNENA_AWAY");
		$state = "warning";
		break;
	case 2:
		$label = JText::_("COM_KUNENA_BUSY");
		$state = "important";
		break;
	case 3:
		$label = JText::_("COM_KUNENA_INVISIBLE");
		$state = "default";
		break;
	default:
		$label = JText::_("COM_KUNENA_OFFLINE");
		$state = "default";
		break;
}

but if you var-dump the getStatus();-Method you see that it returns a boolean and not an integer. Any help is welcome...

Here's the report:
Warning: Spoiler! [ Click to expand ]

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Time to create page: 0.158 seconds