1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Xenforo Session among third domains

Discussion in 'XenForo Development Discussions' started by stoppy, Sep 15, 2014.

  1. stoppy

    stoppy New Member

    I have xenforo installed on a 3rd domain of my website: forum.studentville.it

    I would like to read the session (if it is open) on the others 3rd domain (ex. www.studentville.it)

    I am using Xenforo SDK https://xenforo.com/community/resources/xenforo-sdk.2790/.

    If a user is logged in with Facebook it work, the sdk is able to take the current session and getUser() functions returns the right logged user.

    If I log in using username/email and password, getUser() returns an empty array. I think because is not able to read the session (instead if facebook is active he is able to read the facebook session).

    I tried to add in the config files this lines of code but it looks like it's not working.

    $config['cookie'] = array(
    'prefix' => 'xf_',
    'path' => '/',
    'domain' => '.studentville.it'

    Do you have any suggestion?

  2. attemis

    attemis Member

    I use
    'domain' => '*.domain.tld'
  3. Jeff Berry

    Jeff Berry Well-Known Member

    Have you tried something like this? (this must be called before the session is started)

  4. stoppy

    stoppy New Member

    Hi, I tried all this solution but they did not work. I solved with an iframe at the end of the template that calls
    a page I setted up, passing few parameters in order to open with safety new session and cookie in the rest
    of the website.

    When a user logs out, this parameters are null and I delete sessions ad cookies.

Share This Page