On Mar 6, 2007, at 4:47 PM, Kevin Walsh wrote:
Bill Carr <suppressed> wrote:I'm having trouble getting automatic logins to work with CookieLogin. I am using Interchange 5.4.1 (UserDB.pm,v 2.41 2005/11/08) with indirect_login. I am able to login with the correct value in my indirect_login field (email). However, the MV_USERNAME cookie is set to the value of the username field. When I come back to the site the cookie login is attempted but since indirect_login is set for my userdb the following indirect_login query is attempted: select username from userdb where email = '61' I login like so: [userdb function=login indirect_login=email cgi=1]I'm logged in but MV_USERNAME cookie is the username field from userdb.When I come back indirect login is attempted with the value of my username from the MV_USERNAME cookie not my e-mail address. Is anyone using inderct_login with CookieLogin and is it working?Not me, but I just spent a couple of minutes looking at the code. The following patch is completely untested, but it may be worth a go: --- UserDB.pm 15 Jan 2007 18:45:45 -0000 2.51 +++ UserDB.pm 6 Mar 2007 21:43:34 -0000 @@ -1323,7 +1323,7 @@ ); } - username_cookies($self->{USERNAME}, $pw)+ username_cookies($self->{PASSED_USERNAME} || $self-> {USERNAME}, $pw)if $Vend::Cfg->{CookieLogin}; if ($self->{LOCATION}{LAST} ne 'none') { You will need to clean out your MV_USERNAME cookie after patching.
I forgot line 1719 of UserDB.pm 2.51 seems to do the wrong thing
$self->{USERNAME} = $foreign if $foreign;
It sets the USERNAME to the name of the indirect login field.
Bill Carr
Bottlenose - Wine & Spirits eBusiness Specialists
(877) 857-6700
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.