[CMF-checkins] CVS: CMF - register.py:1.3
Jens Vagelpohl
jens@digicool.com
Thu, 12 Jul 2001 11:51:47 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault/skins/control
In directory korak.digicool.com:/tmp/cvs-serv693/CMFDefault/skins/control
Modified Files:
register.py
Log Message:
Applied patch from Chris Withers which avoids quoting problems for the error message if a
problem occurs (PTK Tracker 339)
--- Updated File register.py in package CMF --
--- register.py 2001/06/29 14:48:40 1.2
+++ register.py 2001/07/12 15:51:46 1.3
@@ -9,13 +9,17 @@
if not portal_properties.validate_email:
failMessage = portal_registration.testPasswordValidity(password, confirm)
if failMessage:
- return REQUEST.RESPONSE.redirect(context.absolute_url() +'/join_form?error=%s' % (failMessage))
+ return context.join_form( context, REQUEST, error=failMessage )
+
failMessage = portal_registration.testPropertiesValidity(REQUEST)
+
if failMessage:
- return REQUEST.RESPONSE.redirect(context.absolute_url() +'/join_form?error=%s' % (failMessage))
+ return context.join_form( context, REQUEST, error=failMessage )
else:
password=REQUEST.get('password') or portal_registration.generatePassword()
portal_registration.addMember(REQUEST['username'], password, properties=REQUEST)
+
if portal_properties.validate_email or REQUEST.get('mail_me', 0):
portal_registration.registeredNotify(REQUEST['username'])
- return context.registered(context,REQUEST)
+
+ return context.registered( context, REQUEST )