Codeigniter with wordpress |
[eluser]jamesduncan[/eluser]
Hi all, Ive searched the forum and found some answers to this issue but trying to provide more specific info to potentially get some help Im trying to set up a Codeigniter application with a Wordpress instill located in a subfolder ie: www (Codeigniter App) -/blog (WP install in sub dir) Ideally we want to have CI handle login and register (and user profiles) due to a number of specific business rules - this is all done already using Ion Auth Then we'd like some specific published pages/content to come out of Wordpress - I have the WP JSON plugin installed but ideally I want to just use WP The main question I have is how do I keep a user logged in when switching between both platforms - I dont know too much about CI or PHP sessions so any help on how to access them from within Wordpress would be helpful ie: if user is logged in - show links in the header to their profile and show their username in WP - if not, links to our Ion Auth sign up page (in CI of course) Cheers and thanks
[eluser]jamesduncan[/eluser]
Ive been able to Google this post about doing it http://www.indevcenter.com/2012/06/23/ac.../#more-201 My question would be - do I drop the code suggested in the post into one of my WP theme PHP files? (basically like a CI view file) Ive tried doing that and printing and echoing and getting no results print_r($data); or print_r($_SESSION); Cheers
[eluser]jamesduncan[/eluser]
So Ive also discovered that Ion Auth handles some user info I need to access http://stackoverflow.com/questions/90880...n-to-a-str So I guess the question is how do I access this session info from Ion Auth within a Wordpress install setup like Ive outlined about in my original question? Thanks
[eluser]jamesduncan[/eluser]
So Ive been able to get things working - I've just lost access to Wordpress's admin using this code below http://www.thedaylightstudio.com/the-whi...ntegration But I'll keep trying to figure this out for anyone else.
[eluser]Oscar Dias[/eluser]
Hey, Nice sources, thanks for sharing... Once I managed to get the integration working the other way around, enablig CodeIgniter to use WP functions. In my case WP managed the users. If you want to take a look, my 'experiments' are online: http://oscardias.com/development/php/cod...deigniter/ Cheers |
Welcome Guest, Not a member yet? Register Sign In |