Commit ebf856be authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_credential: do not pass REQUEST when calling mailPasswordResetRequest

REQUEST will be filled when mailPasswordResetRequest is called from URL, and is now used to prevent anonymous to call mailPasswordResetRequest directly if erp5_credential is installed.
parent 06ebae68
...@@ -13,16 +13,14 @@ if message_reference is None: ...@@ -13,16 +13,14 @@ if message_reference is None:
notification_message = portal.NotificationTool_getDocumentValue(message_reference, notification_message = portal.NotificationTool_getDocumentValue(message_reference,
context.getLanguage()) context.getLanguage())
context.REQUEST.set('came_from', context.getUrlString())
if context.hasStopDate(): if context.hasStopDate():
kw = {'expiration_date':context.getStopDate()} kw = {'expiration_date':context.getStopDate()}
else: else:
kw = {} kw = {}
portal.portal_password.mailPasswordResetRequest(user_login=reference, portal.portal_password.mailPasswordResetRequest(user_login=reference,
REQUEST=context.REQUEST,
notification_message=notification_message, notification_message=notification_message,
store_as_event=portal.portal_preferences.isPreferredStoreEvents(), store_as_event=portal.portal_preferences.isPreferredStoreEvents(),
came_from=context.getUrlString(),
batch=True, batch=True,
**kw) **kw)
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