帮助 Wordpress 和 Pligg 之间的单点登录 [英] Help Single sign on between Wordpress and Pligg

查看:30
本文介绍了帮助 Wordpress 和 Pligg 之间的单点登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

整合

Pligg 网址

http://localhost/pligg/

WordPress 网址

Wordpress URL

http://localhost/pligg/wordpress/

推荐答案

我认为您正在努力使用户在登录 Wordpress 时也登录到 Pligg.这是正确的吗?

I think you're trying to make it so that when a user is logged into Wordpress they are also logged into Pligg. Is this correct?

有一篇有趣的文章介绍了这一点 作者提到编辑 \libs\login.php 文件的地方.它基本上是编辑文件的函数并将 user_logged_onto_wp() 添加为自定义函数,这......好吧,这是作者的意思:

There is an interesting article covering this where the author mentions editing the \libs\login.php file. It's basically editing the file's function and adding user_logged_onto_wp() as a custom function which... well here's the author's quite:

修改 Pligg 的所有工作都在‘libs/login.php’中进行.我们想要做的是让 Pligg 使用 WordPress cookie/身份验证登录.如果用户在 Pligg 中尚不存在,请创建它.此外,将所有现有用户数据复制到 Pligg 数据库.我们将不再使用 Pligg 的登录、身份验证或注销.

All the work to modify Pligg takes place in ‘libs/login.php’. What we want to do is get Pligg to login using WordPress cookies/authentication. If the user doesn’t yet exist in Pligg, create it. Also, copy over all the existing user data to the Pligg database. We won’t be using Pligg’s login, authentication or logout any more.

但是,我们不能只包含 wordpress 并调用 wordpress 函数.相反,我们将不得不手动完成.我所做的是添加了一个名为 is_user_logged_onto_wp() 的函数,它可以完成所有额外的工作.

However, we can’t just include wordpress and call wordpress functions. Instead, we’re going to have to do it manually. What I’ve done is added a function called is_user_logged_onto_wp(), which does all the extra work.

检查链接并遵循他的代码,这应该仍然适用于最新的 Pligg 1.1.4 CMS.不确定,因为我没有亲自测试过...

Check the link and follow his code, this should still work with the latest Pligg 1.1.4 CMS. Not sure though as I haven't personally tested...

这篇关于帮助 Wordpress 和 Pligg 之间的单点登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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