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 an validate the link sent to the user email? Thank you António 2013/1/24 Anthony <[email protected]> > 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.** >> 5b69736f48756e745d203761316331**616335363861663836623330306632** >> 336633626331313330303733313731**66323864322e746f7272656e74.**txt', >> 'alvara': 'auth_user.alvara.**805038e5d4b9eb6d.** >> 5b69736f48756e745d203761316331**616335363861663836623330306632** >> 336633626331313330303733313731**66323864322e746f7272656e74.**txt', >> 'reset_password_key': '', 'segactrab': 'auth_user.segactrab.** >> bb8701b55fa2b064.**5b69736f48756e745d203761316331** >> 616335363861663836623330306632**336633626331313330303733313731** >> 66323864322e746f7272656e74.**txt', 'registration_key': 'pending', 'id': >> 12, 'first_name': 'x1', 'password': 'sha512$be6a36fe3bf02136$** >> 613c45102d17a3e9f3496a86ac81aa**515004251feba9401ae6127bd82a57** >> 14d14661f783694fbf7e8baa428bde**a56887c81c5987454f1d6424204204**609d9826', >> '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': '[email protected]', 'obs': ''}> >> >> >> >> so i use form.email and it works. >> >> Is this correct? >> >> >> >> 2013/1/24 António Ramos <[email protected]> >> >>> GLOBAL NAME USER IS NOT DEFINED!!!!! >>> :) >>> >>> i tried also "USERS" but same error!!! >>> >>> >>> >>> 2013/1/24 Bruno Rocha <[email protected]> >>> >>>> >>>> auth.settings.verify_email_**onaccept = lambda USER: >>>> mail.send(to='antoni...@**cires.pt',subject='Conta pendente de Aprovação. >>>> Portal Empreiteiros',message=repr(**USER)) >>>> >>>> -- >>>> >>>> >>>> >>>> >>> >>> >> -- > > > > --

