Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Making it so they don't have to re-login everytime

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 05-17-2003, 07:57 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Making it so they don't have to re-login everytime

I have some visitors complaining about having to re-login everytime they come back.

How difficult is it to keep them logged in until they log out. Maybe set a cookie that gets read upon return and creates the session?
Reply With Quote
  #2  
Old 05-18-2003, 07:12 AM
 
Eddie Hillegers Eddie Hillegers is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 47
 

Default

Sorry i can not help you with a solution, but i would be verry carefull
with this. What happens if somebody stays logged in at the office or
such? Especially when you store creditcard information it can lead to
verry unpleasant situations. Who will be responsible if other people
start bying on his account?

Cheers Eddie
__________________
X-cart 4.1.11
PHP 5.2.0
MySQL 5.0
www.ebonist.nl
Reply With Quote
  #3  
Old 05-18-2003, 07:43 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Yup, I understand the possible ramifications.

I NEVER store credit card information on my records, I just don't want that responsibility, and the user takes responsibility for their account in our terms of service.
Reply With Quote
  #4  
Old 05-18-2003, 10:50 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

If you change inlcude/check_useraccount.php: from

Code:
session_register("login"); session_register("login_type");

to

Code:
session_set_cookie_params(15552000); session_register("login"); session_register("login_type");

That will save their session for 6 months - but I would warn against it for all the same reasons as highlighted.
__________________
ex x-cart guru
Reply With Quote
  #5  
Old 05-19-2003, 06:47 AM
  anoack's Avatar 
anoack anoack is offline
 

Senior Member
  
Join Date: Dec 2002
Location: Austin, TX
Posts: 113
 

Default

Would it be possible to add a check box next to the login box
[X] Remember my Password

?
Reply With Quote
  #6  
Old 05-20-2003, 10:05 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

That's a good idea, and then maybe have a javascript popup warning when they check it.

I'll work on this tonight and see what I can come up with, don't see why it wouldn't be doable.
Reply With Quote
  #7  
Old 05-20-2003, 10:07 AM
  anoack's Avatar 
anoack anoack is offline
 

Senior Member
  
Join Date: Dec 2002
Location: Austin, TX
Posts: 113
 

Default

Cool!!! Keep us updated on your progress. Something like that would be very usefull!
Reply With Quote
  #8  
Old 05-21-2003, 12:10 AM
 
barabbas barabbas is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 52
 

Default

yeah, that sounds really good, if you get the code for it, please share
Reply With Quote
  #9  
Old 05-22-2003, 11:41 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

session_set_cookie_params(15552000);

Adding that does not seem to work to keep sessions.

I can do the logistics of the checkbox, and what not, but I'm having difficulty getting it to set the extended cookie, and I need to do that first.
Reply With Quote
  #10  
Old 05-22-2003, 12:11 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Quote:
Originally Posted by funkydunk
Code:
session_set_cookie_params(15552000); session_register("login"); session_register("login_type");

Definitely doesn't work, any other thoughts?
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:59 AM.

   

 
X-Cart forums © 2001-2020