Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] Wrong query
#1
In inc/class_session.php:
$query = $db->simple_select(TABLE_PREFIX."usergroups", "usergroup", "gid='".$mybb->user['banoldgroup']."'", array('limit' => 1)); 
			$group = $db->fetch_array($query);
			$mybb->user['usergroup'] = $group['usergroup'];
The problem is that there's no column with the name usergroup in the table usergroups. Do we need the query? It think it should be just this line:
$mybb->user['usergroup'] = $mybb->user['banoldgroup'];
Greets,
Michael
-------------
[Image: donation_drive_sig.png]
#2
In inc/class_session.php find:

$query = $db->simple_select(TABLE_PREFIX."usergroups", "usergroup", "gid='".$mybb->user['banoldgroup']."'", array('limit' => 1));
$group = $db->fetch_array($query);
$mybb->user['usergroup'] = $group['usergroup'];
$mybbgroups = $mybb->user['usergroup'];

and replace with

$mybb->user['usergroup'] = $mybb->user['banoldgroup'];
$mybb->user['displaygroup'] = $mybb->user['banolddisplaygroup'];
$mybb->user['additionalgroups'] = $mybb->user['banoldadditionalgroups'];
if($mybb->user['additionalgroups'])
{
	$mybb->user['additionalgroups'] = ','.$mybb->user['additionalgroups'];
}
$mybbgroups = $mybb->user['usergroup'].$mybb->user['additionalgroups'];
#3
This bug has been fixed in the latest code.

Please note the latest code is not live on the site or for download. An update will be released which contains this fix.


Forum Jump:


Users browsing this thread: 1 Guest(s)