ezsystems/ezp-next — pull request #99 by lolautruche (2012-10-23 14:52:01+00:00)
Title: EZP-19865 - Allow to share session between some siteaccesses (frontend)

Ref https://jira.ez.no/browse/EZP-19865

With this PR, you can have a session name set in your siteaccess configuration, that will override the one set in `framework.session.name` (defaults to *PHPSESSID*).

The default behavior is to have a different session name per siteaccess (session name will be `eZSESSID{siteaccess_hash}`, where `{siteaccess_hash}` will be replaced by a real hash).

Consider following config in `ezpublish.yml`:

```yaml
ezpublish:
siteaccess:
# Available siteaccesses
list:
- ezdemo_site
- fre
- ezdemo_site_admin
# Siteaccess groups. Use them to group common settings.
groups:
ezdemo_group: [ezdemo_site, fre, ezdemo_site_admin]
front_group: [ezdemo_site, fre]
default_siteaccess: ezdemo_site
match:
Map\URI:
ezdemo_site: ezdemo_site
fre: fre
ezdemo_site_admin: ezdemo_site_admin

# System settings, grouped by siteaccess and/or siteaccess group
system:
ezdemo_group:
database:
type: mysql
user: root
password: root
server: localhost
database_name: ezdemo
languages: [eng-GB, fre-FR]
var_dir: var/ezdemo_site
front_group:
session_name: TotoAimeLeVelo
ezdemo_site_admin:
# Bypass UrlAliasRouter to use the admin interface since everything needs to run via the legacy kernel
url_alias_router: false
```

In this example, both `ezdemo_site` and `fre` will have *TotoAimeLeVelo* as session name and will thus be able to share it, while `ezdemo_site_admin` will have *eZSESSID{siteaccess_hash}* (which is the default value).

## Note
If a session name has been set under **framework.session.name** like the following, it will be ignored:

```yaml
framework:
session:
name: SomeSessionName # Will be automatically overridden by eZ Publish configuration
```