Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Checking if user is logged in
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

adeptdeveloper
Starting Member

USA
2 Posts

Posted - June 24 2015 :  14:30:39  Show Profile  Reply with Quote
What is the best way to check if the user is logged in?

ekoradesna
Starting Member

Netherlands
5 Posts

Posted - June 24 2015 :  21:25:22  Show Profile  Reply with Quote
Hi adept,

After further investigating, I think there is a way to monitor the user.

You can capture the customer Session and create a page to monitor it.

Thanks



R, Peter

Code is universal language

Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - June 25 2015 :  04:47:24  Show Profile  Visit serjtankian's Homepage  Reply with Quote
how to do that? any sample?






*serj*
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - June 25 2015 :  08:57:28  Show Profile  Reply with Quote
Or just use
if GetSess(''Login'') = '' '' then ... etc
wherever you need to find out if a customer is not logged in

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

support
Administrator

4679 Posts

Posted - June 25 2015 :  20:57:40  Show Profile  Visit support's Homepage  Reply with Quote
Hello there,

You can check using code to see if customer is logged in or not by retrieving value of GetSess("Customerid") or GetSess("Lastname"). If the value of one of the session above is not empty, then the customer is logged in. If the value of the mentioned session is empty then that means the customer is not logged in.

Hope this helps.

Thank you
Wilson
VPCart Support
Go to Top of Page

adeptdeveloper
Starting Member

USA
2 Posts

Posted - June 26 2015 :  17:54:48  Show Profile  Reply with Quote
Thanks, but that doesn''t seem very secure. Anybody with a web browser can create a non-empty cookie.

I was thinking there is some type of hash value saved in the cookie that I can compare to something in the database.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00