[TYPO3-dev] FE User Cookie Domain

Alexander Wahl mail at alexproject.de
Mon May 14 11:18:04 CEST 2012


Hello Kay,

as far as I know, cookie-domain only recognizes urls, subdomains or 
wildcards like *.example.com.

We ran into the same problem on a project using different 
TYPO3-installations on one domain in different directories. The only 
solution which worked correctly for us was to patch t3lib_beUserAuth and 
tslib_feUserAuth to set different cookie names in $this->name in both 
classes.

I remember there were some issues regarding this problem on forge to set 
the cookie-name via localconf. But I dont't know if it is already 
integrated in the Core.

Cheers
Alex



Am 14.05.2012 09:13, schrieb Kay Strobach:
> Hello Guys,
>
> i need to set the fe user cookie domain typoscript based for a project :(
>
> How can this be done (know that it's possible with hooks).
>
> Site Structure:
>
> http://domain.tld/customer1
> http://domain.tld/customer2
> http://domain.tld/customer ...
>
> Fe Users logged in on customer1 are also loggedin in customer2 by
> default, this needs to be suppressed ;)
>
> -------------
> @Hooks, problem here is, that i would need to use:
>
> $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp']
>
> This hook is executed right after setting the cookie, so one cookie has
> to be destroyed and another one has to be set ... not a really good
> solution :D
>
> ------------
> Other way found: use
>
> $GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['cookieDomain']
>
> And set it in ext_tables.php based on a regex ..., but i would like to
> use ts ;)
>
> Regards
> Kay




More information about the TYPO3-dev mailing list