| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Making it so they don't have to re-login everytime | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||||
|
|||||||||
My assumption is that you need to set a seperate cookie, and then read from that cookie to start a new session when they return.
|
|||||||||
#12
|
|||||||||
|
|||||||||
Ok. So we set a cookie:
Create a sub-folder in the Modules folder called: Save_Login Create a file in the sub-folder called: set_cookie.php and put this code in it: Code:
Then open /include/login.php and find this code: Code:
AFTER that put: Code:
If the person is a customer, they now have a LoginCookie set under the domain name containing "username" and "logintype" where C is the userlevel, set to expire in 6 months. Now we need to read from that cookie. (I'm documenting the process but don't believe this code to be correct until the process is finished). |
|||||||||
#13
|
|||||||||
|
|||||||||
Looks like there's some protection in check_useraccount.php against faking cookies or session variables:
Code:
Please be encourage to make this monologue a dialogue |
|||||||||
#14
|
|||||||||
|
|||||||||
Got it to work, will post full modification for feedback, criticism and security checks shortly.
|
|||||||||
#15
|
|||||||||
|
|||||||||
Here's what's needed. I'm using I beleive 3.2.2, not positive on that.
Create a sub-folder in the Modules folder called: Save_Login Create a file in the sub-folder called: set_cookie.php and put this code in it: Code:
Create another file in that subfolder called: reset_cookie.php with this code in it: Code:
Open include/check_useraccount.php and change to look like this: Code:
Open up /include/login.php and find where it says this: Code:
AFTER that, add this: Code:
Also in include/login.php find this: Code:
AFTER that add: Code:
Open up skin1/auth.tpl (Note: I believe I've made some slight changes to this file, maybe just adding the "navlink" class). File should look similar to this: Code:
|
|||||||||
#16
|
|||||||||
|
|||||||||
I'm by no means a programming expert, anybody see any security flaws.
There might be an issue with being able to fake cookies. |
|||||||||
#17
|
|||||||
|
|||||||
Been watching your posts for a while now. I haven't dissected the code yet, but regardless of the outcome - kudos on the work.
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat] |
|||||||
#18
|
|||||||||
|
|||||||||
Thanks. I plan on creating a new reality TV show: The making of an automatic login script :P
Definitely a cookies issue here, password will likely need to be written to a cookie and verified as well, however that could create a security issue in that the password can be pulled from the cookie. |
|||||||||
#19
|
|||||||||
|
|||||||||
Quote:
Oh yeah? I heard FOX was going to produce it |
|||||||||
#20
|
|||||||||
|
|||||||||
Naturally.
|
|||||||||
|
|||
X-Cart forums © 2001-2020
|