https://www.icyphoenix.com/viewtopic.php?f=29&t=4250
-----------------------------------
hal9000
Tue 27 May, 2008 16:05

027-0020 Default Avatar In Profile_view_user.php
-----------------------------------
I have found this bug after an user told me that when she watch the list of users who viewed her profile there appeared an user without name and just the "member" avatar. It was a guest, of course, but IP was displaying the wrong default avatar. This is because the user_id used to retrieve the default avatar is the current user id instead the viewer user id. Here is how to fix it:

[code]#  
#-----[ OPEN ]------------------------------------------  
# 

profile_view_users.php

#  
#-----[ FIND ]------------------------------------------  
#

	$viewer_avatar = user_get_avatar($row['user_id'], $row['user_avatar'], $row['user_avatar_type'], $row['user_allowavatar']);

#  
#-----[ REPLACE WITH ]------------------------------------------  
# 

	$viewer_avatar = user_get_avatar($row['viewer_id'], $row['user_avatar'], $row['user_avatar_type'], $row['user_allowavatar']);
[/code]


-----------------------------------
Mighty Gorgon
Wed 02 Jul, 2008 11:23

Re: BUG: Default Avatar In Profile_view_user.php (FIXED)
-----------------------------------
Thanks I have fixed it.


