Last change
on this file since 9819 was
1593,
checked in by uli, 18 years ago
|
Merged current trunk into uli-branch.
|
-
Property svn:keywords set to
Id
|
File size:
790 bytes
|
Rev | Line | |
---|
[1067] | 1 | ## Script (Python) "logout" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
| 7 | ##parameters= |
---|
| 8 | ##title=Logout handler |
---|
| 9 | ## |
---|
| 10 | # notify the event service that the user has logged out |
---|
| 11 | import logging |
---|
[1593] | 12 | logger = logging.getLogger('Skins.logout') |
---|
[1067] | 13 | user = context.portal_membership.getAuthenticatedMember() |
---|
| 14 | if user: |
---|
| 15 | from Products.CPSCore.EventServiceTool import getPublicEventService |
---|
| 16 | evtool = getPublicEventService(context) |
---|
| 17 | evtool.notifyEvent('user_logout', user, {}) |
---|
[1593] | 18 | logger.info('%s logged out' % (user)) |
---|
[1067] | 19 | |
---|
| 20 | REQUEST = context.REQUEST |
---|
| 21 | if REQUEST.has_key('portal_skin'): |
---|
| 22 | context.portal_skins.clearSkinCookie() |
---|
| 23 | REQUEST.RESPONSE.expireCookie('__ac', path='/') |
---|
| 24 | return REQUEST.RESPONSE.redirect(REQUEST.URL1+'/logged_out') |
---|
Note: See
TracBrowser for help on using the repository browser.