You can customize tables. If your "auth_user" table has a field
'username' that's used for login. By default, there is no "username"
and it uses "email". That is why I used "email" in m example.

Massimo

On May 21, 6:31 am, HansD <[email protected]> wrote:
> the user table only contains email and not username. providing
> 'username' as a key will crash it as the database currently has no
> username field.
>
> On May 21, 10:01 am, HansD <[email protected]> wrote:
>
> >     def get_or_create_user(self, keys):
> >         if 'username' in keys:
> >             username = 'username'
> >         elif 'email' in keys:
> >             username = 'email'
> >         else:
> >             raise SyntaxError, "user must have username of email"
>
> > should the message not be "user must have username or email" (or vs
> > of)?
>
> > On May 21, 9:39 am, HansD <[email protected]> wrote:
>
> > > in gluon.tools, under Auth.__init__ i found the following piece of
> > > code:
>
> > >         if not request.vars._next:
> > >             request.vars._next = request.env.http_referer or ''
> > >         if next == DEFAULT:
> > >             next = request.vars._next or self.settings.login_next
>
> > > next will thus allways be request.vars._next (when initially DEFAULT)
> > > due to the 2 lines above it.
> > > Should they be switched, or ..
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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