Try this: #####Controller###### def status_checker(): if auth.is_logged_in(): pass else: redirect(URL(f="user", args="login"))
form = SQLFORM(db.blah) if form.accepts(request.vars, session, onvalidation=status_checker): redirect(URL("index")) On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco > On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco > On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco > On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco > On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco > On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco > On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco > On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco > On Wednesday, May 16, 2012 4:55:23 PM UTC+1, Marco Prosperi wrote: > > hi all, > what could be a clean way to require login (if not already logged in) when > a user clicks on the submit button of a form? > > thanks in advance for advice > > Marco >