sharing session data across multiple applications

Thanks for the help. Here's what I have now: if I log into the account center, I get a new entry in the session database that doesn't change. If I delete that record in the database and then visit the homepage (still logged in), it re-creates that entry in the database, and yet the logged in page still doesn't show.

So it seems like the session is there, it's just not being identified correctly.

Here's the code for my home controller, which should detect if the user is logged in or not. If they are, show the homepage, otherwise, show a landing page.

function index()
        $is_logged_in = $this->session->userdata('is_logged_in');
        if(!isset($is_logged_in) || $is_logged_in != TRUE) {
            // $this->output->enable_profiler(TRUE);
        } else {
            $data['pageTitle'] = "Your one-stop shop for properties with potential.";
            $data['main_content'] = "home";
            $this->load->view('includes/template', $data);

Do I need to re-set the session data before I can start using it? When I log in, a function gets the user's information and sets the userdata so I can use it anywhere I want. Do I have to do that process again for each application?

Not sure why, but now it *does* insert a new row into the database when I switch from back to front. The userdata is blank.

Got it!! I had to have the same encryption key for both applications. Thanks for all of the help!!

you're welcome...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.