Actually, it is not the form that gets passed to the 
auth.settings.verify_email_onaccept function -- instead it is the user 
record itself. That's why Bruno used the name "user" instead of "form" for 
the argument to the lambda. You can see below that the email message is 
showing a serialization of a single Row object, which is the user record. 
user.email will therefore be just the email address.

Anthony

On Thursday, January 24, 2013 9:32:33 AM UTC-5, Ramos wrote:
>
> i replaced form.vars by just form  in the message and the email i get 
> shows me that form has no vars
>
> <Row {'empresa': '213', 'last_name': 'x1', 'segrespcivil': 
> 'auth_user.segrespcivil.89f9704f45c0034c.5b69736f48756e745d20376131633161633536386166383662333030663233663362633131333030373331373166323864322e746f7272656e74.txt',
>  
> 'alvara': 
> 'auth_user.alvara.805038e5d4b9eb6d.5b69736f48756e745d20376131633161633536386166383662333030663233663362633131333030373331373166323864322e746f7272656e74.txt',
>  
> 'reset_password_key': '', 'segactrab': 
> 'auth_user.segactrab.bb8701b55fa2b064.5b69736f48756e745d20376131633161633536386166383662333030663233663362633131333030373331373166323864322e746f7272656e74.txt',
>  
> 'registration_key': 'pending', 'id': 12, 'first_name': 'x1', 'password': 
> 'sha512$be6a36fe3bf02136$613c45102d17a3e9f3496a86ac81aa515004251feba9401ae6127bd82a5714d14661f783694fbf7e8baa428bdea56887c81c5987454f1d6424204204609d9826',
>  
> 'segrespcivilval': datetime.date(2013, 1, 4), 'telefone': '123132', 
> 'segactrabval': datetime.date(2013, 1, 11), 'alvaraval': 
> datetime.date(2013, 1, 3), 'registration_id': '', 'confirm_agreement': 
> True, 'email': 'xis...@yahoo.com <javascript:>', 'obs': ''}>
>
>
>
> so i use form.email and it works.
>
> Is this correct?
>
>
>
> 2013/1/24 António Ramos <ramst...@gmail.com <javascript:>>
>
>> GLOBAL NAME USER IS NOT DEFINED!!!!!
>>  :)
>>
>> i tried also "USERS" but same error!!!
>>
>>
>>
>> 2013/1/24 Bruno Rocha <rocha...@gmail.com <javascript:>>
>>
>>> auth.settings.verify_email_onaccept = lambda USER: 
>>> mail.send(to='antoni...@cires.pt <javascript:>',subject='Conta pendente de 
>>> Aprovação. Portal Empreiteiros',message=repr(USER))
>>>
>>>  -- 
>>>  
>>>  
>>>  
>>>
>>
>>
>

-- 



Reply via email to