Index: trunk/kernel/include/usersession.php =================================================================== diff -u -r1868 -r2000 --- trunk/kernel/include/usersession.php (.../usersession.php) (revision 1868) +++ trunk/kernel/include/usersession.php (.../usersession.php) (revision 2000) @@ -485,21 +485,18 @@ $GroupList[] = $g; $result->MoveNext(); } - $extra_groups = implode(",",$GroupList); - if($PrimaryGroup) - $extra_groups = $PrimaryGroup.",".$extra_groups; - if($PersonalGroup) - { - $this->Set("GroupId",$PersonalGroup); - //$extra_groups .= ",".$PersonalGroup; - } - else - { - $this->Set("GroupId",$PrimaryGroup); - } + + if($PrimaryGroup) array_unshift($GroupList, $PrimaryGroup); + array_push($GroupList, $objConfig->Get('User_LoggedInGroup') ); + + $extra_groups = implode(',', $GroupList); - $this->Set("GroupList", $extra_groups); - $this->Set("LastAccessed",date("U")); + $this->SetVariable('UserGroups', $extra_groups); + + $this->Set('GroupId', $PersonalGroup ? $PersonalGroup : $PrimaryGroup); + + $this->Set('GroupList', $extra_groups); + $this->Set('LastAccessed', date('U') ); $this_login = $this->GetPersistantVariable("ThisLogin"); $this->SetPersistantVariable("LastLogin", $this_login); $this->SetPersistantVariable("ThisLogin", time());