[Zope-CMF] Assigning roles to new users.

José Henrique dos Reis jhreis at senado.gov.br
Tue Dec 2 08:46:58 EST 2003


Hi, 

I'm reposting this question because I have the same problem James Walker had
an year ago.  
I am trying to develop a site using plone and need to setup two types of
users which I have called 'customer' and 'associate'. 
I have created roles for these and added a radio box on a cutom version of
the join_form. Then I have modified the register.py as follows: 

... 
password=REQUEST.get('password') or portal_registration.generatePassword() 
# my bit 
r = ('Member') 
if (REQUEST['membershiptype'] == 'customer'): 
  r = ('Member', 'customer') 
else: 
  r = ('Member', 'associate') 
portal_registration.addMember(REQUEST['username'], password, roles=r,
properties=REQUEST) 
# end of my bit 
if portal_properties.validate_email or REQUEST.get('mail_me', 0): 
... 
to check and set up the appropriate type of account, however it doesn't seem
to work, can anyone help me?

Thank you all.
José Henrique.




More information about the Zope-CMF mailing list