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

Staying logged in?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-06-2003, 04:51 AM
 
bjornstrom bjornstrom is offline
 

Member
  
Join Date: May 2003
Posts: 16
 

Default Staying logged in?

Since our sales people use xcart everyday all day long, they are getting more and more annoyed at beeing logged out all the time.

I thought that one way to solve this might be to put the login information in a cookie. So I searched the forum and found this thread, but I guess the session-variable handling has changed since that was written.

I guess you could change the session-variable handling to the standard php version and still use the same code-idea as described in the above thread.
Is there any reason to choose one of the other session-variable versions or is the choice more about your personal preference?
Reply With Quote
  #2  
Old 10-06-2003, 10:53 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Open two windows one for admin one for customer side

Two different sessions.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 10-06-2003, 12:56 PM
 
bjornstrom bjornstrom is offline
 

Member
  
Join Date: May 2003
Posts: 16
 

Default

You misunderstood my question/problem.
My problem isn't that I want to be logged into both the user and admin part of xcart at the same time. That works fine.

The thing I would like to do is to get the the login to "stick" so that the sales people aren't logged out all the time... The main problem isn't the relogin process, but the work that is lost when it is rejected because the user is no longer logged in.

So I would like to maybe store the login informatin in a cookie and have the user only have to login once a day or so(setting the cookies expiry time one day)

But the problem is that the session variables aren't handled like they were before (with usual php session_register commands) but with x-carts own x_session_register witch does one of three things depending on your settings in config.php. (The session handling is done by sessions.php)

I could just set the session handling to the standard php one and just use the build in command in php to register the session variables as a cookie, but I guess there's a reason for x-carts own session-handling, and I dont want to put that out of play.
Reply With Quote
  #4  
Old 10-06-2003, 02:11 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Bump up the session expire time in sessions.php then?

Code:
if (empty($config["Sessions"]["session_length"])) $config["Sessions"]["session_length"] = 30;

Could even insert a config value to control it as the if statement above is checking for. It isn't default but looks like you can easily set the Session length in the general settings of the admin.

Default is 30 minutes if I'm reading it right.

Code:
$curtime = time(); $expiry_time = $curtime + $config["Sessions"]["session_length"];

Anyhow hth.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 12:27 PM.

   

 
X-Cart forums © 2001-2020