[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Cookies not persistent
At 10:01 AM 6/2/2002 -0700, you wrote:
> >> Ok, I checked and my browser is set to accept persistent cookies.
> >>Here is
>>>the code that sets and reads the cookies:
>>>
>>>[set-cookie name=loginu value="[value mv_username]" expire="Mon,
>>>03->>Jun-2005 12:00:00 GMT"][set-cookie name=loginp value="[value
>>>mv_password]" expire="Mon, 03-Jun-2005 12:00:00 GMT"]
>>>
>>>[set name=autologin interpolate=1][read-cookie loginu][/set]
>>>[if scratch autologin ne ]
>>><font face="Verdana" size="2"><b>Hello [scratchd autologin]!>></b></font>
>>>[/if]
>>>
>>>This code works perfectly to set and read the cookie until the >>browser
>>>is closed and reopened. No cookie is read then and
>>>[read-cookie >>loginu] returns nothing. I've been over and over this
>>>and I can't figure it >>out. Thanks!
>
>>Grant - FWIW, I enabled persistent cookies in my browser,
>>set >CookieLogin to yes in a standard 4.8.3. foundation store, and boom -
>>cookie auto->login works, even after closing and starting an new browser
>>session. The >code that actually writes this cookie is located in
>>Userdb.pm and I would recommend you let it do it's thing rather than
>>trying to roll your >own. All you have to is add a checkbox which (when
>>checked) will set mv_cookie_password to 1 on the login and/or new_account
>>forms one you >have verified that the user's browser will accept cookies...
>
>Ed- I was going to try to make the AutoLogin feature work, but after
>checking out the way it works in the Foundation demo, I decided I really
>didn't like it that way. You aren't logged in when you hit the first page
>of the site, you have to click on a link before you are logged in.
Hmmm... I found that one I set myself for auto login, it happens at he
moment I hit the catalog. This can be confirmed with a little code on your
entry page:
[if session logged_in]You are logged in.[/if]
> I decided I wanted to have the cookie read upon entrance, which enables
> a greeting which offers to log you in with a "Click here to be
> automatically logged in." which then logs you in. That makes more sense to me.
>
>>I can't see anything wrong. Have you verified that your browser is
>>receiving all of the cookie data, including the expiry date?
>>
>>I think it may be a browser problem. Have you tried another browser
>>to see what happens?
>
>Kevin- I changed my browser settings from Enable "Cookies that are stored
>on your computer" to Prompt, and it still sets and reads as long as I
>don't close and re-open the browser.
That is a non-persistent session cookie in action. That is the default
behavior of Interchange.
> The funny thing is I am never prompted.
Prompted... for what? If you are not seeing code that is supposed to be
called conditionally within [if config CookieLogin]...[/if] then that
directive is not enbabled.
- Ed L.
> It seems to me that that must be the way IC is setting the cookie. How
> can I verify that the browser is receiving the expiration date? I sure
> get a nice greeting at Amazon.com so I know persistent cookies are
> working on the browser. I've tried IE 6 and 5 on two different computers
> with the same result.
>
>>Could it be that the browser does not accept a wrong weekday? 3 of >June 2005
>>is a Friday, not Monday...
>
>Rene- Thanks for the idea, but still no persistence.
>
>- Grant
>
>_________________________________________________________________
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>_______________________________________________
>interchange-users mailing list
>interchange-users@interchange.redhat.com
>http://interchange.redhat.com/mailman/listinfo/interchange-users
===============================================================
Increase profits from your Interchange store...
http://www.newmediaems.com/cgi-bin/nm/software_fus.html
===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@newmediaems.com
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================