开发者

Help Single sign on between Wordpress and Pligg

开发者 https://www.devze.com 2023-02-15 10:52 出处:网络
Intergrati开发者_如何学Goon Pligg URL http://localhost/pligg/ Wordpress URL http://localhost/pligg/wordpress/I think you\'re trying to make it so that when a user is logged into Wordpress they ar

Intergrati开发者_如何学Goon

Pligg URL

http://localhost/pligg/

Wordpress URL

http://localhost/pligg/wordpress/


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?

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:

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.

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.

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消