public static function userData()
 {
     unset($_COOKIE['eZCommentsUserData']);
     $cookie = ezcomCookieManager::instance();
     return $cookie->storeCookie();
 }
Beispiel #2
0
     }
     $tpl->setVariable('success', true);
     // add additional success message
     if ($changeNotification) {
         if (!$user->isAnonymous()) {
             if ($existingNotification) {
                 $tpl->setVariable('success_message', ezpI18n::tr('ezcomments/comment/add', 'You have already subscribed to comment updates on this content.'));
             } else {
                 $tpl->setVariable('success_message', ezpI18n::tr('ezcomments/comment/add', 'You will receive comment updates on the content.'));
             }
         } else {
             $tpl->setVariable('success_message', ezpI18n::tr('ezcomments/comment/add', 'A confirmation email has been sent to your email address. You will receive comment updates after confirmation.'));
         }
     }
     //remember cookies
     $cookieManager = ezcomCookieManager::instance();
     if ($http->postVariable('CommentRememberme', false) !== false || !$user->isAnonymous()) {
         $cookieManager->storeCookie($comment);
     } else {
         $cookieManager->clearCookie();
     }
     eZContentCacheManager::clearContentCacheIfNeeded($contentObjectId);
     if (!$changeNotification) {
         $commentINI = eZINI::instance('ezcomments.ini');
         if ($commentINI->variable('GlobalSettings', 'RedirectAfterCommenting') === 'true') {
             $module->redirectTo($redirectURI);
         }
     } else {
         $tpl->setVariable('redirect_uri', $redirectURI);
     }
 }