Ejemplo n.º 1
0
    {
        $cli->output( "Removing all sessions" );
        eZSession::cleanup();
    }
}

if ( $clean['expired_session'] )
{
    if ( !eZSession::getHandlerInstance()->hasBackendAccess() )
    {
        $cli->output( "Could not remove expired sessions, current session handler does not support session garbage collection (not backend based)." );
    }
    else
    {
        $cli->output( "Removing expired sessions,", false );
        eZSession::garbageCollector();
        $activeCount = eZSession::countActive();
        $cli->output( " " . $cli->stylize( 'emphasize', $activeCount ) . " left" );
    }
}

if ( $clean['preferences'] )
{
    $cli->output( "Removing all preferences" );
    eZPreferences::cleanup();
}

if ( $clean['browse'] )
{
    $cli->output( "Removing all recent items and bookmarks for browse page" );
    eZContentBrowseRecent::cleanup();
Ejemplo n.º 2
0
     }
     if ($module->hasActionParameter('ExpirationFilterType')) {
         $expirationFilterType = $module->actionParameter('ExpirationFilterType');
     }
     if (!in_array($expirationFilterType, array('all', 'active'))) {
         $expirationFilterType = 'active';
     }
     $http->setSessionVariable('eZSessionFilterType', $filterType);
     $http->setSessionVariable('eZSessionExpirationFilterType', $expirationFilterType);
 } else {
     if ($module->isCurrentAction('RemoveAllSessions')) {
         eZSession::cleanup();
         $sessionsRemoved = true;
     } else {
         if ($module->isCurrentAction('RemoveTimedOutSessions')) {
             $gcSessionsCompleted = eZSession::garbageCollector();
             $sessionsRemoved = true;
         } else {
             if ($module->isCurrentAction('RemoveSelectedSessions')) {
                 if ($userID) {
                     if ($http->hasPostVariable('SessionKeyArray')) {
                         $sessionKeyArray = $http->postVariable('SessionKeyArray');
                         foreach ($sessionKeyArray as $sessionKeyItem) {
                             eZSession::getHandlerInstance()->destroy($sessionKeyItem);
                         }
                     }
                 } else {
                     if ($http->hasPostVariable('UserIDArray')) {
                         $userIDArray = $http->postVariable('UserIDArray');
                         if (count($userIDArray) > 0) {
                             eZSession::getHandlerInstance()->deleteByUserIDs($userIDArray);