MyBB Community Forums
[F] Users ban is not lifted in class_session - bad banned cache array? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: Archived Bug Reports (https://community.mybb.com/forum-74.html)
+------ Forum: MyBB 1.4.2 (https://community.mybb.com/forum-100.html)
+------ Thread: [F] Users ban is not lifted in class_session - bad banned cache array? (/thread-38991.html)



[F] Users ban is not lifted in class_session - bad banned cache array? - koziolek - 10-13-2008

MyBB 1.4.2

Ban for user is not lifted by class_session.php. Probably because of bad array in data cache.
class_session.php is using $UID as a key:
		// Read the banned cache
		$bannedcache = $cache->read("banned");	
		...
		...
		if($bannedcache[$uid])
		{
But in class_datacache.php we have:
	function update_banned()
	{
		global $db;
		
		$bans = array();
		
		$query = $db->simple_select("banned");
		while($ban = $db->fetch_array($query))
		{
			$bans[] = $ban;
		}
	}
And result - banned cache is not indexed by UIDs.


[F] Users ban is not lifted in class_session - bad banned cache array? - Dennis Tsang - 10-16-2008

Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group