Yes, when I click on the invite and go to the website I get the registration
form filled out with email (and name (excluded from my shortened example))
visible and non-editable.

Luis.

—«sent by mobile»—
On Jul 6, 2011 8:17 PM, "Massimo Di Pierro" <[email protected]>
wrote:
> Are you sure your db.registrant has an email?
>
> On Jul 6, 10:04 pm, Luis Goncalves <[email protected]> wrote:
>> I still get the same error:
>>
>>   File "/home/ubuntu/web2py/gluon/tools.py", line 1683, in register
>>     user = self.db(table_user[username] ==
form.vars[username]).select().first()
>> KeyError: 'email'
>>
>> I don't know if it makes a difference or not, but I'm using emails for
login
>> (not a username) -- as is probably clear to you from the above error.
>>
>> Code is now:
>>
>>   def user():
>>
>>       if request.args(0)=='register':
>>
>>           registrant = db( db.registrant.token == request.vars.token
>> ).select().first()
>>
>>           auth.settings.table_user.email.default = registrant.email
>>           auth.settings.table_user.email.writable=False
>>
>>           auth.settings.registration_requires_verification = False
>>
>>       return dict(form=auth())

Reply via email to