Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread António Ramos
Ok , thank you Also when a user registers and i have in my model auth.settings.registration_requires_verification = True The user when submiting the form is redirected to index and never sees a flash message saying "Please check your email" How can i have a flash message telling the user to check

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread Anthony
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

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread Anthony
I don't think you noticed that Bruno changed the name of the lambda argument to USER: auth.settings.verify_email_onaccept = lambda USER: mail.send(to='antoni...@cires.pt',subject='Conta pendente de Aprovação. Portal Empreiteiros',message=repr(USER)) Anthony On Thursday, January 24, 2013 9:04

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread António Ramos
i replaced form.vars by just form in the message and the email i get shows me that form has no vars so i use form.email and it works. Is this correct? 2013/1/24 António Ramos > GLOBAL NAME USER IS NOT DEFINED! > :) > > i tried also "USERS" but same error!!! > > > > 2013/1/24 Bruno

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread António Ramos
GLOBAL NAME USER IS NOT DEFINED! :) i tried also "USERS" but same error!!! 2013/1/24 Bruno Rocha > > auth.settings.verify_email_onaccept = lambda USER: > mail.send(to='antonio.ra...@cires.pt',subject='Conta pendente de Aprovação. > Portal Empreiteiros',message=repr(USER)) > > -- > > >

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread Bruno Rocha
auth.settings.verify_email_onaccept = lambda USER: mail.send(to='antonio.ra...@cires.pt',subject='Conta pendente de Aprovação. Portal Empreiteiros',message=repr(USER)) --

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread António Ramos
auth.settings.verify_email_onaccept = lambda form: mail.send(to='antonio.ra...@cires.pt',subject='Conta pendente de Aprovação. Portal Empreiteiros',message=repr(users)) NameError: global name 'users' is not defined 2013/1/24 Bruno Rocha > > auth.settings.verify_email_onaccept = lambda user:

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread Bruno Rocha
auth.settings.verify_email_onaccept = lambda user: mail.send(to='antonio.ra...@cires.pt',subject='Conta pendente de Aprovação. Portal Empreiteiros',message=repr(user)) --

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread António Ramos
i tried auth.settings.verify_email_onaccept = lambda form: mail.send(to='antonio.ra...@cires.pt',subject='Conta pendente de Aprovação. Portal Empreiteiros',message=repr(form.vars)) but i get the error!!! AttributeError: 'Row' object has no attribute 'vars' 2013/1/10 Massimo Di Pierro >