Permalink
Browse files

Added cookie prefix config to the installer. If you've recently insta…

…lled from

develop you may want to update your config file
  • Loading branch information...
1 parent ad9549e commit f1e34afbcafaf97d8717caca09a5c4247582373f @jerel jerel committed May 20, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 installer/assets/config/config.php
@@ -272,7 +272,8 @@
| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
|
*/
-$config['cookie_prefix'] = "";
+// for multi-site logins to work properly we have to set a prefix. We use the subdomain for that or default_ if none exists.
+$config['cookie_prefix'] = (substr_count($_SERVER['SERVER_NAME'], '.') > 1) ? substr($_SERVER['SERVER_NAME'], 0, strpos($_SERVER['SERVER_NAME'], '.')) . '_' : 'default_';
$config['cookie_domain'] = ($_SERVER['SERVER_NAME'] == 'localhost') ? '' : $_SERVER['SERVER_NAME'];
$config['cookie_path'] = BASE_URI;
$config['cookie_secure'] = FALSE;
@@ -393,4 +394,4 @@
SHARED_ADDONPATH.'modules/' => '../../../addons/shared_addons/modules/'
);
-/* End of file config.php */
+/* End of file config.php */

0 comments on commit f1e34af

Please sign in to comment.