检查用户是否登录到 opencart [英] check user is logged in to opencart or not

查看:79
本文介绍了检查用户是否登录到 opencart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 opencart 的新手.我已经在我的域中安装了 opencart

I am new to opencart. I have installed opencart on my domain

http://example.org/ocart

和一个位于 url 的 php 应用程序

and a php application at url

http://example.com/testapp

testapp 是一个基本的 php 应用程序,我想在其中检查是否有任何用户登录到 opencart.是否可以在 php 应用程序中检查任何用户已登录到 opencart,如果它已登录,那么我们可以获得登录用户的电子邮件 ID.

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.

ocarttestapp 都使用同一个数据库.

Both ocart and testapp are using the same database.

推荐答案

你可以检查你的其他问题你会得到你的答案

You can check your other question you will get your answer

通过php文件访问opencart的session数据

完成以上步骤后,您可以在其他http://example.com/testapp

After doing above steps you can access in other http://example.com/testapp

只需使用此代码访问

session_start();
if(!empty($_SESSION['opencart']['customer_id'])){
      // User Loged in.
}

这篇关于检查用户是否登录到 opencart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆