Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -N -r2310 -r2363 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 2310) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 2363) @@ -14,7 +14,7 @@ else { $t = $this->Application->GetVar('t'); - $this->Application->Redirect($t ? $t : 'index'); + $this->Application->Redirect($t ? $t : 'index', $_GET); } } @@ -51,10 +51,7 @@ $object->Load($user_id); if( $object->GetDBField('Status') == STATUS_ACTIVE ) { - $sql = 'SELECT GroupId FROM %s WHERE (PortalUserId = %s) AND ( (MembershipExpires IS NULL) OR ( MembershipExpires >= UNIX_TIMESTAMP() ) )'; - $sql = sprintf($sql, TABLE_PREFIX.'UserGroup', $user_id); - - $groups = $this->Conn->GetCol($sql); + $groups = $object->getMembershipGroups(true); if(!$groups) $groups = Array(); if (!defined('ADMIN')) array_push($groups, $this->Application->ConfigValue('User_LoggedInGroup') ); $this->Application->StoreVar( 'UserGroups', implode(',', $groups) );