Is there a way to maintain logged-in status across sub-domains? I've tried adding a cookie prefix in config.php to no avail... not sure what else to try.
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.Sign up to join this community
It seems like you can set a "cookie_domain" variable to the config.php. Just figured this out by having a quick look at expressionengine/core/EE_Config.php around line 277. For cross sub domains persisting cookie, I believe your domain should be one of the seven special ones (http://wp.netscape.com/newsref/std/cookie_spec.html). In short $config['cookie_domain'] = ".yourdomain.com" would be worth a try!
You need to enable multi-site login via the
config.php file. You add a statement like:
$config['multi_login_sites'] = "http://domain.org/|http://domain2.org/";
for each site/domain that they are logging into. Now the downside of this, is if you are logging them into a number of sites, the user will see a series of login flashes, from the EE successful login screen. I'm not certain if there is a way to remove that.
I know for the clients we've done this for, we reduced the multi-site logins to just the sites were people could place orders, submit forms, etc., as opposed to trying to login them into all sub sites at once.
If there are a lot of sites, and the user needs to be logged into all of them, then I recommend taking a look at this Stackoverflow question and response, on how sites like Facebook handle it.