Commit 94740bdc authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_authentication_policy: expire cookie so user is redirected to login forum

parent 77b864bc
......@@ -32,6 +32,9 @@ else:
if context.getPassword():
is_password_expired = True
if is_password_expired:
context.REQUEST.RESPONSE.expireCookie('__ac', path='/')
request = portal.REQUEST
request.set('is_user_account_password_expired', is_password_expired)
request.set('is_user_account_password_expired_expire_date', expire_date_warning)
......
......@@ -17,4 +17,5 @@ authentication_event = portal.system_event_module.newContent(
activate_kw = activate_kw)
authentication_event.setDestinationValue(context)
authentication_event.confirm()
context.REQUEST.RESPONSE.expireCookie('__ac', path='/')
return authentication_event
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