1 ##parameters=userid='', requestReset='', ajax=''
2 from Products
.CMFCore
.utils
import getUtilityByInterfaceName
3 from Products
.Plinn
.utils
import Message
as _
4 utool
= getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool')
5 rtool
= getUtilityByInterfaceName('Products.CMFCore.interfaces.IRegistrationTool')
8 msg
= rtool
.requestPasswordReset(userid
)
10 context
.setStatus(True, _('Request for resetting password sent to your contact email.'))
11 context
.setRedirect(utool
.getPortalObject(), 'object/view', ajax
=ajax
)
14 context
.setStatus(False, msg
)
17 target
= '%s/request_password_reset_form' % utool()
18 options
['action'] = target
20 return context
.request_password_reset_template(**options
)