It is simpler that that def mystuff(form): do_something_with(form.vars)
auth.settings.login_onaccept=mystuff On Feb 15, 11:37 pm, reyelts <[email protected]> wrote: > I'd like to extend the login method of the Auth class to do a couple > of initialization things based on the login. Based on what I've been > reading, it looks like I *should* be able to do something like this: > > from gluon.tools import * > > class MyAuth(Auth): > def login( > self, > next=None, > onvalidation=None, > onaccept=None, > log=None, > ): > > Auth.login(self,next,onvalidation,onaccept,log) > > if self.environment.session.auth: > self.environment.session.blah = somevalue > > auth=MyAuth(globals(),db) # authentication/ > authorization > > Of course, my "something like this" doesn't work. What's the correct > way to do this? > > Thanks in advance... -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

