×
Kunena 5.1.5 Released - Security Release (14 Oct 2018)

The Kunena team has announce the arrival of Kunena 5.1.5 [K 5.1.5] which is now available for download as a native Joomla extension for J! 3.8.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1. This is a Security release.

× Topics that are moved into this category are considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Own profile photo shown if user is deleted

More
4 years 3 months ago #1 by Gee
Hello, if a user deletes his profile in the community (I am using JomSocial) his forum posts will be shown with the avatar of the logged in user. Probably because no user id is given the logged in user is shown. This should be changed. Thank you!

This message contains confidential information

Database collation check: The collation of your table fields are correct

Joomla! SEF: Enabled | Joomla! SEF rewrite: Enabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 60 seconds | Max execution memory: 1024M | Max file upload: 128M

Kunena menu details:

Warning: Spoiler! [ Click to expand ]

Joomla default template details : musicalradio | author: musicalradio.de | version: 1.0.7 | creationdate: Unknown

Kunena default template details : NTS KMonazite | author: Nice Theme Store | version: 3.0.2 | creationdate: 2013-05-24

Kunena version detailed: Kunena 3.0.5 | 2014-03-09 [ Invecchiato ]
| Kunena detailed configuration:

Warning: Spoiler! [ Click to expand ]
| Kunena integration settings:
Warning: Spoiler! [ Click to expand ]
| Joomla! detailed language files installed:
Warning: Spoiler! [ Click to expand ]

Third-party components: Jomsocial 3.2.0.6

Third-party SEF components: sh404sef 4.3.0.1671

Plugins: Search - Kunena Search 3.0.1 | Content - Kunena Discuss 3.0.1 | JomSocial - My Kunena Forum Menu 2.0.3 | JomSocial - My Kunena Forum Posts 2.0.3 | JomSocial - Kunena Groups 2.0.3

Modules: Kunena Latest 3.0.1 | Kunena Stats 3.0.1 | Kunena Login 3.0.1 | Kunena Search 3.0.1

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

More
4 years 3 months ago #2 by xillibit

Gee wrote: Hello, if a user deletes his profile in the community (I am using JomSocial) his forum posts will be shown with the avatar of the logged in user.

Hello,

What you mean by "logged user" ? Is the avatar of default suer ?

I don't provide support by PM, because this can be useful for someone else.

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

More
4 years 3 months ago - 4 years 3 months ago #3 by Gee
If I am logged in my avatar will be shown on post of a user whose account has been deleted. If someone else is logged in he will see his avatar with that post.

Looks to me like the user id is deleted and CFactory::getUser($userId) without userid will show the logged in user (so me). I think there should be a database check if the user is deleted or not.

I changed plugins/kunena/community/avatar.php

from
	protected function _getURL($user, $sizex, $sizey)
	{
		$user = KunenaFactory::getUser($user);
		// Get CUser object
		$user = CFactory::getUser($user->userid);
		if ($sizex<=90)	$avatar = $user->getThumbAvatar();
		else $avatar = $user->getAvatar();
		return $avatar;
	}

to
	protected function _getURL($user, $sizex, $sizey)
	{
		$user = KunenaFactory::getUser($user);
		// Get CUser object
 
      $db = JFactory::getDbo();
      $query = $db->getQuery(true);
      $query->select('id');
      $query->from('#__users');
      $query->where('id = '.$user->userid);
      $db->setQuery($query);
      $usercheck = $db->loadObject();
 
      if($usercheck) {
 
		$user = CFactory::getUser($user->userid);
		if ($sizex<=90)	$avatar = $user->getThumbAvatar();
		else $avatar = $user->getAvatar();
 
    }
 
		return $avatar;
	}

to get it right.
Last edit: 4 years 3 months ago by Gee.

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

More
4 years 3 months ago #4 by xillibit
Thanks, i need to look into it to see what's happen, i'am not sure if it's a good idea to have an extra query here because you could decrease your site performance

I don't provide support by PM, because this can be useful for someone else.

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

More
4 years 3 months ago - 4 years 3 months ago #5 by Matias
I think this is already been taken care of in a pull request from JomSocial team.

I'm not sure if it gets to the next release (we're just in final tests), though, as there were some other issues that need to be solved.
Last edit: 4 years 3 months ago by Matias.
The following user(s) said Thank You: woonydanny

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

More
4 years 3 months ago #6 by Gee
Good to hear this will be fixed. It will decrease site performance thats true, but some users really don't understand why their profile picture is shown with another username and post. Esp. on negative forum posts :side:

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.111 seconds