Multi siteaccess - clear session cookie on registration

Author Message

Tom W

Wednesday 08 September 2010 2:32:21 pm

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,

André R.

Thursday 09 September 2010 12: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

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Ivo Lukac

Thursday 09 September 2010 12: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

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Ivo Lukac

Thursday 09 September 2010 12: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 :(

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

André R.

Thursday 09 September 2010 1: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.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Ivo Lukac

Thursday 09 September 2010 2: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.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Tom W

Thursday 09 September 2010 8:19:45 am

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.