f3ec6fee357764673844bef5d3d3b81298f3c54f
1 ## Script (Python) "logout"
4 from Products
.CMFCore
.utils
import getToolByName
5 from Products
.CMFDefault
.utils
import translate
6 def _(msg
) : return translate(msg
, context
)
7 utool
= getToolByName(context
, 'portal_url')
8 REQUEST
= context
.REQUEST
9 if REQUEST
.has_key('portal_skin'):
10 context
.portal_skins
.clearSkinCookie()
11 REQUEST
.RESPONSE
.expireCookie('__ac', path
='/')
12 session
= REQUEST
.SESSION
13 for k
in session
.keys() :
15 context
.setStatus(True, _('You have been logged out.'))
16 portal
= utool
.getPortalObject()
17 return context
.setRedirect(portal
, 'object/view')