简体   繁体   English

使用opencart进行WordPress管理员会话身份验证?

[英]Wordpress admin session auth with opencart?

I have a Wordpress installation and a Opencart installation on my server. 我的服务器上有Wordpress安装和Opencart安装。 I want to integrate the admin-account of those installaltions so that I can use the login of Wordpress to also be authorised as the administrator of Opencart. 我想集成这些installaltions的管理员帐户,以便可以使用Wordpress的登录名来也被授权为Opencart的管理员。

With Google I have figured out that I can make use of the wp-config.php file for this, but I have no idea of how to unset Opencart's own login feature in advantage of Wordpress. 使用Google,我已经知道可以使用wp-config.php文件,但是我不知道如何利用Wordpress取消Opencart自己的登录功能。 Any idea? 任何想法? :) :)

Without going deeper, you may try placing hidden form areas which you get from wp-login.php inside the opencart and change opencart login page tpl file as it first sends login information to wplogin with ajax at background and then let opencart login goes on as usual. 不用更深入地讲,您可以尝试将从wp-login.php获得的隐藏表单区域放置在opencart内,并更改opencart登录页面tpl文件,因为它首先将登录信息发送到wplogin并在后台使用ajax,然后让opencart登录继续通常。

Note that to use a logic like this both usernames and passwords should be same in both opencart and wordpress... (also maybe you can check wordpress login result and then let opencart login form posted with some extra effort) 请注意,要使用这样的逻辑,opencart和wordpress中的用户名和密码都应该相同...(也许您也可以检查wordpress登录结果,然后让opencart登录表单花费更多的精力)

Long (but maybe the real) solution lies in creation of a login session for one with another login form. 长期(但也许是真正的)解决方案在于使用另一个登录表单创建一个登录会话。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM