Commit 18295e08 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_auto_logout: Fix /logout url access when not being logged in.

parent b79a0de5
from AccessControl import getSecurityManager
portal = context.getPortalObject()
portal.portal_sessions.manage_delObjects(
portal.Base_getAutoLogoutSessionKey(
username=getSecurityManager().getUser().getUserName(),
username = getSecurityManager().getUser().getUserName()
if username is not None:
portal.portal_sessions.manage_delObjects(
portal.Base_getAutoLogoutSessionKey(
username=username,
)
)
)
REQUEST = portal.REQUEST
if REQUEST.has_key('portal_skin'):
portal.portal_skins.clearSkinCookie()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment