On Fri, Oct 30, 2009 at 9:23 AM, cpicada <cpic...@gmail.com> wrote: > > Yes, but it doesn't do exactly what I am looking for. I need to > compute values *before* the registration happens, and in this case it > works at login and only if the user was registered and logged out > already. If I have: > > def f(form): form.vars.username='apu' > auth.settings.login_onvalidation=f >
I think this misses the point - you can do exactly what you want; it's in the logic you setup around your code (and you just have to work out that logic). The above is _one_ example of a mechanism by which to do something like this. > > ... and I register with username 'xxx', the username record at > auth_user contains 'xxx', but not 'apu', and the system logs me in as > 'xxx' *at registration* > If I log out and try to log in as 'xxx', then it doesn't allow me, as > expected, but I can fake a login by having an 'apu' user already > registered and entering the username 'xxx' with the password of the > registered 'apu'. > > I'm sorry if this looks confusing. I appreciate the time and interest > that you take in addressing my doubts. > > cpicada.wordpress.com > > > On Oct 30, 2:18 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > yes > > > > def f(form): form.vars.two = form.vars.one+1 > > auth.settigns.login_onvalidation = f > > > > and on the right side a function that can computes new form.vars from > > existing form.vars. > > > > On Oct 30, 4:21 am, cpicada <cpic...@gmail.com> wrote: > > > > > Is there a way to process the data entered at the register form before > > > doing the actual registration? > > > > > I am looking for a way to add computed values to a user record during > > > registration, login and profile modification. > > > > > I am sorry if this is a silly question. I am very new to web2py (I > > > have been working with django until now). I bought and read the e-book > > > sold at Lulu and I also made some searches in this group, but I don't > > > seem to get it right. > > > Regards, > > > > > cpicada.wordpress.com > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---