本文整理汇总了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());
}
示例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');
示例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);