MyBB Community Forums

Full Version: Userlist IPs look like (2�)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When i had upgraded from 1.6.14 to 1.8, When it was converting IPs in the database, Now when im logged into the admin panel the 'Last Known IP' &'Registration IP' all look like 


J��0	2�	
�/Ƿ	�/Ƿ	
jD6�		
Y�^	g��	
�[ى	�[ى	
`*˟	`*˟	
`�6\	�J�f	
K�U�	K�U�	
��@	r	
��%	G� B	
u�W�	u�[	
R��A	b$	
����	�� �	
�-q�	�-�+	
�?dL	�?dL	
l��G	l��G	
t���	t���	
LL�r	��c	
sF�5	sF�5	
jE	|��o	
[���	[���	
��	��	
D��	D��	
B�9o	
����	����	
Lj�	Lj�	
ec(	ec�	
Ojm�	Ojm�	
]xe	]xe
But when i look at the Administrator Logs, it logs the admins IP and that is normal like xxx.xxx.xxx.xxx
Only happens when im on 'admin/index.php?module=user'
If a admin account is required i will make one, for MYBB STAFF ONLY!
Thanks,
Charless(cjmwid)
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/1418

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Think I've got this.. need someone with this issue to test it though.
This issue has been appearing on my forum as well.

I have upgraded from 1.6.15 -> 1.8
Verified, and it works

Thanks

Fix:
Edit: ./admin/modules/user/users.php
Find: Lines 3531-3535
 			if(!$user['avatar'])
 			{
 				$user['avatar'] = "../".$mybb->settings['useravatar'];
 			}
 			$user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";

Add under line 3535:
			
// Convert IP's to readable
			$user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
			$user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));

Final:
 			if(!$user['avatar'])
 			{
 				$user['avatar'] = "../".$mybb->settings['useravatar'];
 			}
 			$user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";
 
			// Convert IP's to readable
			$user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
			$user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));

 			if($view['view_type'] == "card")
 			{
 				$users .= build_user_view_card($user, $view, $i);
 			}
 			else
 			{
 				build_user_view_table($user, $view, $table);
 			}
 		}