X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/3f032bd10705f163d90cb7b9dfedc64c91ce727c..797d6a6d2797c8ff4ac50e7a107c585f838ff282:/skins/generic/request_password_reset_form.py diff --git a/skins/generic/request_password_reset_form.py b/skins/generic/request_password_reset_form.py index 69a34c3..1e9b57c 100644 --- a/skins/generic/request_password_reset_form.py +++ b/skins/generic/request_password_reset_form.py @@ -1,13 +1,17 @@ -##parameters=userid='', requestReset='' +##parameters=userid='', requestReset='', ajax='' from Products.CMFCore.utils import getUtilityByInterfaceName from Products.Plinn.utils import Message as _ utool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool') rtool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IRegistrationTool') if requestReset : - uuid = rtool.requestPasswordReset(userid) - context.setStatus(True, _('request for resetting password sent')) - return 'yeah !' + msg = rtool.requestPasswordReset(userid) + if not msg : + context.setStatus(True, _('Request for resetting password sent to your contact email.')) + context.setRedirect(utool.getPortalObject(), 'object/view', ajax=ajax) + return + + context.setStatus(False, msg) options={} target = '%s/request_password_reset_form' % utool()