[Zope-CMF] Changing the registration process

seb bacon seb@jamkit.com
08 Feb 2002 10:05:03 +0000


On Fri, 2002-02-08 at 03:49, Chad Nantais wrote:
> My client's CMF site needs a custom member registration process along the
> following lines:
> 
> 1.When a user goes to the 'join' form, they must enter a username which they
> were assigned offline, in combination with a signup code that they also
> received offline.

<snip>
 
> What do I need to modify in order to make the registration process work as
> described? Any ideas?

You need to replace CMFDefault.RegistrationTool with your own version. 
You would do the necessary checks in the testPropertiesValidity method. 
I would also store the list of valid usernames and codes in the
RegistrationTool, and add methods to set and get the usernames, along
the lines of 

  ...
  self._valid_users = ({'uid':'foo','code':'bar'},
                 {'uid':'quux','code':qux'})
 
  def getValidUsers(self):
    return self._valid_users

  ..etc..

Then you can provide a management interface to this list by doing
something like

<dtml-in "portal_registration.getValidUsers()" mapping>
  &dtml-uid; : &dtml-code; <br>
</dtml-in>

hth,

seb