Massimo Thanks. Your suggestion to change the code in gluon/tools.py works like a charm. I am now able to send the ID in email. Thanks much (I had initially *misread *your answer as *%(id)s **shouldn't **be allowed*)
On Wednesday, June 25, 2014 10:52:03 AM UTC-5, Massimo Di Pierro wrote: > > wrong cut and paste. From the code > > d = dict(request.vars) > d.update(dict(key=key, link=link,username=form.vars[username])) > > I just changed > > d = dict(from.vars) > d.update(dict(key=key, link=link,username=form.vars[username])) > > because you are right. %(id)s should be allowed. > > On Wednesday, 25 June 2014 10:49:54 UTC-5, Massimo Di Pierro wrote: >> >> from the code gluon/tools.py >> >> d.update(dict(key=key, link=link,username=form.vars[username])) >> >> >> On Tuesday, 24 June 2014 18:08:48 UTC-5, Kenwyn Pilgrim wrote: >>> >>> Hi >>> I'm trying to send the *id* of the newly registered user in the string >>> *auth.messages.verify_email*. I've tried *%(id)s* but immediately get a >>> ticket. >>> >>> <type 'exceptions.KeyError'> 'id' >>> >>> When initializing the string *auth.messages.verify_email*, I've been >>> able to use other place holders, such as *%(first_name)s*, *%(last_name)s >>> *and even customer fields such as *%(referring_name)s*. >>> I've tried setting *auth.messages.verify_email* in default.py in the >>> user() function as well, but it returns none. >>> I've also tried setting *auth.messages.verify_email * in a custom >>> function through *auth.settings.register_onaccept*. Here I can see the >>> *id* of the newly registered user, but it seems as though at this >>> point, the mail has already been sent. >>> >>> Also, where can I find a list of all the place holders such as *%(key)s* >>> etc., >>> that can be used in *auth.messages.verify_email* >>> >>> Thanks much >>> >>> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

