[CMF-checkins] CVS: CMF - reconfig.py:1.1 register.py:1.1 reconfig.dtml:NONE register.dtml:NONE
andrew@digicool.com
andrew@digicool.com
Thu, 28 Jun 2001 17:16:27 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault/skins/control
In directory korak.digicool.com:/tmp/cvs-serv28484/control
Added Files:
reconfig.py register.py
Removed Files:
reconfig.dtml register.dtml
Log Message:
*converted to python scripts.
--- Added File reconfig.py in package CMF ---
## Script (Python) "reconfig"
##title=Reconfigure Portal
##parameters=
REQUEST=context.REQUEST
context.portal_properties.editProperties(REQUEST)
return REQUEST.RESPONSE.redirect(context.portal_url() + '/reconfig_form?portal_status_message=CMF+Settings+changed.')
--- Added File register.py in package CMF ---
## Script (Python) "register"
##title=Register a user
##bind namespace=_
##parameters=password, confirm
REQUEST=context.REQUEST
portal_properties = context.portal_properties
portal_registration = context.portal_registration
join_form=context.join_form
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))
failMessage = portal_registration.testPropertiesValidity(REQUEST)
if failMessage:
return REQUEST.RESPONSE.redirect(context.absolute_url() +'/join_form?error=%s' % (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 REQUEST.RESPONSE.redirect(context.absolute_url() + '/registered')
--- Removed file reconfig.dtml from package CMF --
--- Removed file register.dtml from package CMF --