Not sure I understand -- are you saying you added that line to tools.py? 
What does you code look like?

BTW, I think the onvalidation for request_reset_password didn't work 
because request_reset_password adds a validator to the email field that 
requires the submitted email address to be in the db. If the address is 
converted to lower at registration time, but the user enters an address 
containing caps on the request_reset_password form, the submitted address 
won't be found, and validation will fail before the onvalidation function 
gets called.

Here's a secret -- onvalidation can be a dictionary with keys 'onsuccess' 
and 'onfailure'. You could create an onvalidation['onfailure'] function 
that handles the conversion and lookup. It should check if there's a 
form.errors.email, and if so, convert form.vars.email to lowercase, check 
to see if the converted email is in the db, and if so, delete 
form.errors.email. The form will then pass validation.

Anthony

On Friday, December 9, 2011 3:20:57 PM UTC-5, Constantine Vasil wrote:
>
> I am using this:
>
> form=current.app.auth.request_reset_password()
>
> and it is in tools.py - is it possible this to be done outside
> tools.py?
>

Reply via email to