Forums / General Questions / Automatic login onclick of link from email account

Automatic login onclick of link from email account

Locked

Started by sachin1234 on 30 Dec 2008, 10:23 AM · Views: 2,936

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
30 Dec 2008, 10:23 AM
#1
sachin1234 avatar

sachin1234

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Automatic login onclick of link from email account

Hello,
I want auto login feature in my zencart web site.
The feature I need is suppose customer receive an email from e-shop.
Email has one link which redirect customers to e-shop .
On click of that link customer automatically sign-in(login) in the e-shop.

Any one suggest me how that can be done.

Thx

30 Dec 2008, 12:42 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Automatic login onclick of link from email account

I'd recommend adding an extra column to the customer table to store an MD5 encryted version of their email address concatonated with their encryted password.

Then either extend the header_php file for the existing login page, or create a new auto_login page based on it, that that looks for this as a parameter, reads the customer table to find the relevant customer and logs them in using the code in the longin page's header_php file.

This is a little fiddly and will require some database and PHP knowledge, as well as a basic understanding of how Zen Cart pages are constructed.

Of course, you would also be allowing anybody who intercepts the email to also login as the customer ... are you OK with that?

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)