Which version of web2py are you looking at?

First - in the most current version, I think you are talking about line 653,
in
get_or_create_user();

You will note at the beginning of that function:

    if 'username' in keys:
            username = 'username'
        elif 'email' in keys:
            username = 'email'
        else:
            raise SyntaxError, "user must have username or email"

(there are 2 other places with lines like this, and they do similar checks;
so you can define a username in your auth, or by default it uses email).

You might want to get a look at:
http://bazaar.launchpad.net/~mdipierro/web2py/devel/annotate/head%3A/gluon/tools.py

BEWARE:  if you get the latest revision from launchpad, there is a bug in
template.py - which I'm waiting for Massimo to apply the patch for...  You
can remove the ".read()" portion of line 120 yourself in the meantime, that
is in parse_template():

        try:
            fp = open(t, 'rb').read()
            parent = fp.read()
            fp.close()

should read:

        try:
            fp = open(t, 'rb')
            parent = fp.read()
            fp.close()


- Yarko

On Thu, Aug 6, 2009 at 7:29 PM, Bottiger <bottig...@gmail.com> wrote:

>
> I am trying to incorporate OpenID into Auth.
>
> In my attempt to implement a CAS style plugin into auth, I stumbled
> upon a bizzare error.
>
> On line 628 of gluon.tools, there is the following line:
>
> "users = self.db(table_user[username] == keys[username]).select()"
>
> username is defined to be "username" if you have a username and
> "email" if you have email specified. However, when I looked at the
> auth_user table, there is no "username" column.
>
> The closest thing to a username column is first_name or last_name, but
> obviously this isn't the same thing.
> >
>

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

Reply via email to