Back to index

plone3  3.1.7
mail_password.py
Go to the documentation of this file.
00001 ## Script (Python) "mail_password"
00002 ##bind container=container
00003 ##bind context=context
00004 ##bind namespace=
00005 ##bind script=script
00006 ##bind subpath=traverse_subpath
00007 ##title=Mail a user's password
00008 ##parameters=
00009 
00010 from Products.CMFPlone import PloneMessageFactory as pmf
00011 REQUEST=context.REQUEST
00012 try:
00013     response = context.portal_registration.mailPassword(REQUEST['userid'], REQUEST)
00014 except ValueError, e:
00015     context.plone_utils.addPortalMessage(pmf(str(e)))
00016     response = context.mail_password_form()
00017 return response