On Thu, Aug 6, 2009 at 8:16 PM, Yarko Tymciurak <yark...@gmail.com> wrote:
> On Thu, Aug 6, 2009 at 8:09 PM, Bottiger <bottig...@gmail.com> wrote: > >> >> I am using the latest version. > > > By "latest version" do you mean revision 1062 from Launchpad, or do you > mean > Sorry - I meant Launchpad version 1062, or Released Version 1.65.11 (which looks to be Launchpad version 1056)? > > >> >> I know there is a check, but the check is useless. If you specify a >> username in the dictionary that comes with the argument, then it will >> automatically assume that your auth_users table has a username column, >> which isn't the case. > > > You you define the auth_users table, then you can define this additional > field; > if not, it uses the email field. > This is how it is designed. > > Am I missing something? > > >> >> >> On Aug 6, 5:58 pm, Yarko Tymciurak <yark...@gmail.com> wrote: >> > 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/.<http://bazaar.launchpad.net/%7Emdipierro/web2py/devel/annotate/head%3A/.> >> .. >> > >> > 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 -~----------~----~----~----~------~----~------~--~---