问题
I am new to opencart. I have installed opencart on my domain
http://example.org/ocart
and a php application at url
http://example.com/testapp
testapp
is a basic php application in which I want to check if any user is logged in to opencart
or not. Is it possible to check in php app that any user is logged in to opencart and if it is logged in then can we get the email id of logged in user.
Both ocart
and testapp
are using the same database.
回答1:
You can check your other question you will get your answer
access session data of opencart through php file
After doing above steps you can access in other http://example.com/testapp
Just Access with this code
session_start();
if(!empty($_SESSION['opencart']['customer_id'])){
// User Loged in.
}
来源:https://stackoverflow.com/questions/47354618/check-user-is-logged-in-to-opencart-or-not