> > 1. Will Richard's script work if the value of "_formkey" is extracted from > the login page? >
The _formkey only works with sessions, which I don't think would be available when running a script. > 2. What does Massimo mean by "If you accept(request.vars, formname=None)"? > Is it a setting that I can add in a specific file? > If you call form.accepts() without passing session to it (or call form.process() and pass session=None), it will not generate a _formkey and you therefore don't have to worry about it. Anyway, if you want to log in programmatically rather than via a form in the browser, the best method is to use auth.login_bare() -- see http://web2py.com/books/default/chapter/29/9#Manual-Authentication. Anthony

