当前位置: 首页>>代码示例>>PHP>>正文


PHP eZContentObject::cleanupAllInternalDrafts方法代码示例

本文整理汇总了PHP中eZContentObject::cleanupAllInternalDrafts方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObject::cleanupAllInternalDrafts方法的具体用法?PHP eZContentObject::cleanupAllInternalDrafts怎么用?PHP eZContentObject::cleanupAllInternalDrafts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eZContentObject的用法示例。


在下文中一共展示了eZContentObject::cleanupAllInternalDrafts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logoutUser

    public static function logoutUser()
    {
        session_destroy();
        if( UserLog::canStore() )
        {
            $user = MMUsers::getCurrentUserObject();
            UserLog::instance()->action('logout');

            if( $user )
                UserLog::instance()->uuid( $user->attribute( 'uuid' ) );
            else
                UserLog::instance()->uuid('Unknown')->msg('Logout called for not logged in user');

            UserLog::instance()->store();
        }

        AppBarControl::instance()->store();

        $user = eZUser::instance();
        // Remove all temporary drafts
        eZContentObject::cleanupAllInternalDrafts( $user->attribute( 'contentobject_id' ) );

        // destroy t3 cookies
        // temporary fix - we are reaching the header size limit
        // self::destroyApplicationCookie( 't3process' );

        MMSelections::destroyCookie();
        MMUsers::destroyCookieUserPreferences();
        CookieTool::destroyCookie( 'catchUpSpe' );
        CookieTool::destroyCookie( 'displayToUPPPopin' );
        CookieTool::destroyCookie( 'displayToUPPPopin', '/', null );
        CookieTool::destroyCookie( 'displayToUPPPage' );
        CookieTool::destroyCookie( 'displayToUPPPage', '/', null );
        CookieTool::destroyCookie( MMUsers::COOKIE_KEY );
        CookieTool::destroyCookie(session_name());
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:36,代码来源:mmUserLogin.php

示例2:

                if ($chosenGroupURI) {
                    // if we've chose an URI from one of the user's groups.
                    $redirectionURI = $chosenGroupURI;
                }
            }
        }
    }
    $userID = 0;
    if ($user instanceof eZUser) {
        $userID = $user->id();
    }
    if ($userID > 0) {
        $http->removeSessionVariable('eZUserLoggedInID');
        $http->setSessionVariable('eZUserLoggedInID', $userID);
        // Remove all temporary drafts
        eZContentObject::cleanupAllInternalDrafts($userID);
        return $Module->redirectTo($redirectionURI);
    }
} else {
    // called from outside of a template (?)
    $requestedURI = $GLOBALS['eZRequestedURI'];
    if ($requestedURI instanceof eZURI) {
        $requestedModule = $requestedURI->element(0, false);
        $requestedView = $requestedURI->element(1, false);
        if ($requestedModule != 'user' or $requestedView != 'login') {
            $userRedirectURI = $requestedURI->originalURIString(false);
        }
    }
}
if ($http->hasPostVariable("RegisterButton")) {
    $Module->redirectToView('register');
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:login.php

示例3:

<?php

/**
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version 2014.11.1
 * @package kernel
 */
$http = eZHTTPTool::instance();
$user = eZUser::instance();
// Remove all temporary drafts
eZContentObject::cleanupAllInternalDrafts($user->attribute('contentobject_id'));
$user->logoutCurrent();
$http->setSessionVariable('force_logout', 1);
$ini = eZINI::instance();
if ($ini->variable('UserSettings', 'RedirectOnLogoutWithLastAccessURI') == 'enabled' && $http->hasSessionVariable('LastAccessesURI')) {
    $redirectURL = $http->sessionVariable("LastAccessesURI");
} else {
    $redirectURL = $http->postVariable('RedirectURI', $ini->variable('UserSettings', 'LogoutRedirect'));
}
return $Module->redirectTo($redirectURL);
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:21,代码来源:logout.php


注:本文中的eZContentObject::cleanupAllInternalDrafts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。