X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/63f5e85cdbd05ac9a00a6dab60548c226981fb62..125a6289be7a631a256f948bda5415451aca6d98:/skins/generic/password_reset_form.py diff --git a/skins/generic/password_reset_form.py b/skins/generic/password_reset_form.py new file mode 100644 index 0000000..b783b63 --- /dev/null +++ b/skins/generic/password_reset_form.py @@ -0,0 +1,19 @@ +##parameters=validate='' +from Products.CMFCore.utils import getUtilityByInterfaceName +utool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool') +atool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IActionsTool') + +form = context.REQUEST.form +uuid = traverse_subpath[0] + +if validate and \ + context.validatePassword(**form) and \ + context.reset_password_control(uuid=uuid, **form) and \ + context.setRedirect(atool, 'user/join', ajax=form.get('ajax')) : + return + +options = {} +options['uuid'] = uuid +options['action'] = '%s/password_reset_form/%s' % (utool(), uuid) + +return context.password_reset_template(**options) \ No newline at end of file