Welcome Guest, Not a member yet? Register   Sign In
Cross-Application Sessions?
#1

[eluser]ShoeLace1291[/eluser]
I use two different applications in my CI installation. The first is called "admin"... obviously an admin panel. The second is "frontend" where everything else is. I use the same database for each of the apps and the same member tables, both for admin authentication and member auth. The problem is, since the CI session class doesn't use native PHP sessions, the session only works in the application that it is set in(which makes sense)... for example, if a user that is indeed an admin logs into the system through the frontend app and then clicks the link to the admin app, they are required to login again. If they have the "Remember Me" option selected across when they login to both apps, this obviously isn't a problem.

How would I fix this? Or do you guys think it's better to have them login to the admin app again, just to validate their admin status again?

Thanks for your time.
#2

[eluser]Pert[/eluser]
If your sites are within same domain name, you can do this in your <b>application/config/config.php</b> file for both projects

Code:
// 'cookie_domain' = Set to .your-domain.com for site-wide cookies
$config['cookie_domain'] = "";

This should do the trick.




Theme © iAndrew 2016 - Forum software by © MyBB