Fixed in trunk. I will try fix the GAE problem reported by some users
and repost 1.76.5.
Thanks to you and Aurélien.

Massimo

On Mar 10, 8:06 pm, "mr.freeze" <[email protected]> wrote:
> Same problem. Look at line 1252 of tools.py. As Aurelien says, it
> should probably be table_user instead of user.
>
> On Mar 10, 6:39 pm, mdipierro <[email protected]> wrote:
>
> > try 1.76.4 which is out.
>
> > On Mar 10, 5:42 pm, "mr.freeze" <[email protected]> wrote:
>
> > > I think you found a bug but I can tell that there is another problem
> > > because it is doing a double redirect and not showing
> > > auth.messages.registration_pending after registration. Trying to
> > > debug...
>
> > > On Mar 10, 6:12 am, Aurelien Dumez <[email protected]> wrote:
>
> > > >   Hello,
>
> > > >   I'm new to web2py and I'm sorry if my issue has already been
> > > > addressed (although I did extensive searches about it).
>
> > > >   Here are my problem and the steps to reproduce it. I'm working with
> > > > web2py version 1.76.3 (fresh install) on Fedora 12.
>
> > > > 1. I create a new application (using the web UI)
> > > > 2. According to the Web2py book, I modify the file models/db.py to
> > > > enable registration approval (so I uncomment the line
> > > > auth.settings.registration_requires_approval = True)
> > > > 3. I try to register a new user
>
> > > > And I get the following error :
>
> > > > File "/home/aurelien/web2py/gluon/restricted.py", line 173, in
> > > > restricted
> > > >     exec ccode in environment
> > > >   File "/home/aurelien/web2py/applications/dt/controllers/default.py",
> > > > line 55, in <module>
> > > >   File "/home/aurelien/web2py/gluon/globals.py", line 96, in <lambda>
> > > >     self._caller = lambda f: f()
> > > >   File "/home/aurelien/web2py/applications/dt/controllers/default.py",
> > > > line 34, in user
> > > >     return dict(form=auth())
> > > >   File "/home/aurelien/web2py/gluon/tools.py", line 726, in __call__
> > > >     return self.register()
> > > >   File "/home/aurelien/web2py/gluon/tools.py", line 1251, in register
> > > >     user[form.vars.id] = dict(registration_key='pending')
> > > > UnboundLocalError: local variable 'user' referenced before assignment
>
> > > > After some tries, I realize that, in the file gluon/tools.py (line
> > > > 1251), replacing user[form.vars.id] with table_user[form.vars.id]
> > > > fixed my problem.
>
> > > > As I said above I'm new to web2py so I don't know if this is a real
> > > > bug or if I missed something.
>
> > > > Thank you for your help.
>
> > > > Aurélien.

-- 
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.

Reply via email to