Index: trunk/core/units/users/users_item.php =================================================================== diff -u -r4065 -r4524 --- trunk/core/units/users/users_item.php (.../users_item.php) (revision 4065) +++ trunk/core/units/users/users_item.php (.../users_item.php) (revision 4524) @@ -15,11 +15,16 @@ { $this->persistantVars[$var_name] = $var_value; - $replace_hash = Array( 'PortalUserId' => $this->GetID(), - 'VariableName' => $var_name, - 'VariableValue' => $var_value - ); - $this->Conn->doInsert($replace_hash, TABLE_PREFIX.'PersistantSessionData', 'REPLACE'); + if ($this->GetID() > 0) { + $replace_hash = Array( 'PortalUserId' => $this->GetID(), + 'VariableName' => $var_name, + 'VariableValue' => $var_value + ); + $this->Conn->doInsert($replace_hash, TABLE_PREFIX.'PersistantSessionData', 'REPLACE'); + } + else { + $this->Application->StoreVar($var_name, $var_value); + } } function getPersistantVar($var_name)