Forum OpenACS Q&A: Re: New Install from Head does not allow login
I just did yet another fresh install, this time with 'firstname.lastname@example.org';, username 'lars pind'. Login just fine.
Also, knowing the code, I can't think of anything that would cause that kind of behavior. "Unknown username", yes, but not with the kind of system to it that you're suggesting.
So I'm going to have to ask you to dig one step deeper into this.
It does prompt you for email, not username, right?
Can you tell me the results of a
'select * from parties'
'select * from users'
And then I'm going to have to ask you to start troubleshooting this a bit for me.
The login page calls auth::authenticate, which in turn calls a bunch of other procs, most notably auth::local::authentication::Authenticate.
However, this proc takes username and password, so auth::authenticate looks up by email and finds the username to pass to that proc.
Insert some ns_log Notice statements at strategic points, and see if you can trace the message and which condition triggers it.
That would be most helpful.
Thanks a bunch for your help.
Following Lars' requests:
Yes it prompts for email - enter email address and password and get 'unknown username'. Still asking for email - if you enter the username it comes up 'unknown email'
sql query results:
user_id authority_id username screen_name priv_name priv_email
0 guest 0 5
405 9 Brad 0 5
party_id email url
Looking at the log, I can see that it's querying the users table but has the username all lowercase i.e. select user_id from users where username='brad' and authority_id=9
I tried that query in psql and came up 0 rows returned - if I change username to 'Brad', I get the user_id 405 returned.
I guess next step for me is to dig into auth::authenticate and what-not. Guess there's no better time than the present to get my feet wet looking at tcl code...
In the meantime, you can see this bug live at 188.8.131.52:8888 - I'll leave the install up for today.
Lars, if I can't figure out anything with auth procs, would it help if I let you ssh into my server and poke around?