eZ Community » Forums » Install & configuration » Multi siteaccess - clear session...
expandshrink

Multi siteaccess - clear session cookie on registration

Multi siteaccess - clear session cookie on registration

Wednesday 08 September 2010 11:32:21 pm - 6 replies

Hello,

I'm building a site with 2 siteaccess.
Each one uses a different user class.

The problem I'm facing is that when a person goes from one registration to the other, something is cached in the session cookie, both registration forms end up using the same user class.
Is there any configuration I can set that will remove/timeout the session cookie when a person navigates to the registration page of another siteaccess?

I do see some session settings in the site.ini documentation, though I'm not sure which would work.
Alternatively, is there something in the form of a template operator/function I can call on the template to clear the cookie?

Thanks,

Thursday 09 September 2010 9:17:14 am

You should enable pr siteaccess sessions using

in site.ini.append.php override or the two siteaccesses in question:
[Session]
SessionNamePerSiteAccess=enabled

Thursday 09 September 2010 9:19:17 am

Hi Tom,

We had the exact same problem. There is no ini setting for that. The only solution is to replace session variable "RegisterUserID" with something like "RegisterUserID_".$user_class_id so it will be different for different siteaccess. To do that you need to hack the user/register.php or make custom module with original register.php changed.

Cheers

Thursday 09 September 2010 9:21:12 am

You should enable pr siteaccess sessions using

in site.ini.append.php override or the two siteaccesses in question:
[Session]
SessionNamePerSiteAccess=enabled

I think this is default and it does not help sad.gif Emoticon

Thursday 09 September 2010 10:09:25 am

The default is disabled (its written to your siteaccess during setup) at least for frontend siteaccesses in flow / webin.

Additionally you'll need SessionNameHandler=custom so that above setting actually does anything.

Modified on Thursday 09 September 2010 10:16:34 am by André R

Thursday 09 September 2010 11:18:18 am

The default is disabled (its written to your siteaccess during setup) at least for frontend siteaccesses in flow / webin.

Additionally you'll need SessionNameHandler=custom so that above setting actually does anything.

Hm, I can't be sure now (it was months ago), but I think we have experimented with that but with no luck.

But it is easier to first try with ini setting, that's for sure.

Thursday 09 September 2010 5:19:45 pm

Thank you very much André and Ivo.
The session config solution works.

[Session]
SessionNameHandler=custom
SessionNamePerSiteAccess=enabled
SessionNamePrefix=something_
Using a different prefix for each siteaccess of course. (in case anyone else is looking at this)
In addition to these settings, when logged in from one siteaccess, other siteaccess sees the user as logged in as well.
(this was one of my concerns, because I have 2 more siteaccess to control the languages)

Tested under Ez Publis 4.3.0, PHP 5.2.8

Modified on Thursday 09 September 2010 5:20:58 pm by Tom W

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from