src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php
protected function PostLoginHookMergeTemporaryHistoryWithDatabaseHistory()
    {
        // merge current data with user data
        $aHistory = $this->GetArticleViewHistory();
        $aTmpList = array_reverse($aHistory, true);
        foreach (array_keys($aTmpList) as $histKey) {
            if (is_null($aTmpList[$histKey]->id)) {
                $aData = $aTmpList[$histKey]->sqlData;
                $aData['data_extranet_user_id'] = $this->id;
                $aTmpList[$histKey]->LoadFromRow($aData);
                $aTmpList[$histKey]->AllowEditByAll(true);
                $aTmpList[$histKey]->Save();
            }
        }
        $this->aArticleViewHistory = null;
        $this->GetArticleViewHistory();
        // remove items from cookie...
        $domain = TCMSSmartURLData::GetActive()->sOriginalDomainName;
        if ('www.' == substr($domain, 0, 4)) {
            $domain = substr($domain, 4);
        }
        setcookie(TdbDataExtranetUser::COOKIE_NAME_HISTORY, '', time() - 3600, '/', '.'.$domain, false, true);
    }
protected function PostLoginHookMergeTemporaryHistoryWithDatabaseHistory()
    {
        // merge current data with user data
        $aHistory = $this->GetArticleViewHistory();
        $aTmpList = array_reverse($aHistory, true);
        foreach (array_keys($aTmpList) as $histKey) {
            if (is_null($aTmpList[$histKey]->id)) {
                $aData = $aTmpList[$histKey]->sqlData;
                $aData['data_extranet_user_id'] = $this->id;
                $aTmpList[$histKey]->LoadFromRow($aData);
                $aTmpList[$histKey]->AllowEditByAll(true);
                $aTmpList[$histKey]->Save();
            }
        }
        $this->aArticleViewHistory = null;
        $this->GetArticleViewHistory();
        // remove items from cookie...
        $domain = TCMSSmartURLData::GetActive()->sOriginalDomainName;
        if ('www.' == substr($domain, 0, 4)) {
            $domain = substr($domain, 4);
        }
        setcookie(TdbDataExtranetUser::COOKIE_NAME_HISTORY, '', time() - 3600, '/', '.'.$domain, false, true);
    }
protected function PostLoginHookMergeTemporaryHistoryWithDatabaseHistory ( ) { // merge current data with user data $ aHistory = $ this -> GetArticleViewHistory ( ) ; $ aTmpList = array_reverse ( $ aHistory , true ) ; foreach ( array_keys ( $ aTmpList ) as $ histKey ) { if ( is_null ( $ aTmpList [ $ histKey ] -> id ) ) { $ aData = $ aTmpList [ $ histKey ] -> sqlData ; $ aData [ 'data_extranet_user_id' ] = $ this -> id ; $ aTmpList [ $ histKey ] -> LoadFromRow ( $ aData ) ; $ aTmpList [ $ histKey ] -> AllowEditByAll ( true ) ; $ aTmpList [ $ histKey ] -> Save ( ) ; } } $ this -> aArticleViewHistory = null ; $ this -> GetArticleViewHistory ( ) ; // remove items from cookie... $ domain = TCMSSmartURLData :: GetActive ( ) -> sOriginalDomainName ; if ( 'www.' == substr ( $ domain , 0 , 4 ) ) { $ domain = substr ( $ domain , 4 ) ; } setcookie ( TdbDataExtranetUser :: COOKIE_NAME_HISTORY , '' , time ( ) - 3600 , '/' , '.' . $ domain , false , true ) ; }
takes the article view history from session and merges it with the data
in the database. this is done when the user logs in to make the history permanent.
takes the article view history from session and merges it with the data in the database . this is done when the user logs in to make the history permanent .