ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MSM and logged in users

February 25, 2011 5:14am

Subscribe [3]
  • #1 / Feb 25, 2011 5:14am

    Loquela

    105 posts

    Hi there,

    I’m a bit confused with how MSM handles logged in users and access to admin…

    I have EE2 running with MSM and I have two sites running off two separate domains. I have the installation installed on the server thusly:

    /var/www/www.ee2_site1/public_html/ (system files here)

    /var/www/www.ee2_site2/public_html/ (site 2 index.php here)

    I am only able to access the admin console by going to http://www.ee2_site1.com. If I go to http://www.ee2_site2.com I get the “Oops! This link appears to be broken” error.

    So when I go to http://www.ee2_site1.com and log in, the session is only available to http://www.ee2_site1.com. The session is not shared with http://www.ee2_site2.com. I am of course able to administer site2 but I am not logged into the front end of site2.

    Is there some kind of config setting I am missing? How do I log in to site2?

    Many thanks in advance for any help.

    L.

  • #2 / Feb 25, 2011 2:42pm

    Sue Crocker

    26054 posts

    Hi, Loguela.

    You’ll need to do the following:

    Edit your /system/expressionengine/config/config.php and add:

    $config['multi_login_sites'] = "http://site1.com/index.php|http://site2.com/index.php";

    Does that help?

  • #3 / Feb 25, 2011 3:15pm

    Loquela

    105 posts

    Thanks Sue,

    I’m afraid that doesn’t seem to have any affect at all.

    L.

  • #4 / Feb 25, 2011 3:54pm

    Loquela

    105 posts

    I’ve put the line in here.

    Nothing seems to have change.

    What am I doing wrong?

    /*
    |--------------------------------------------------------------------------
    | ExpressionEngine Config Items
    |--------------------------------------------------------------------------
    |
    | The following items are for use with ExpressionEngine.  The rest of
    | the config items are for use with CodeIgniter.
    |
    */
    
    
    $config['multi_login_sites'] = "http://95.131.70.227/index.php|http://instepwave.com/index.php";  
    
    // END EE config items
  • #5 / Feb 26, 2011 5:09am

    Loquela

    105 posts

    Could really use some help with this. 😊

    Thanks

  • #6 / Feb 27, 2011 5:39pm

    Greg Salt

    3988 posts

    Hi Loquela,

    Can you login to site2 at http://site2.com/index.php/member/login and it then works properly? With regards to the broken link, can you clarify this? Have you set up Masked Access and it isn’t working?

    Cheers

    Greg

  • #7 / Feb 27, 2011 5:59pm

    Loquela

    105 posts

    Hello Greg.

    Many thanks. This works:
    http://site2.com/index.php/member/login

    I was expecting the following:

    A) logging into http://site1.com/system would log me in to both sites (it doesn’t). This logs me into the admin console (obviously) and I can manage both sites from here. But it only logs me into the from front end of site1, not site2.

    B) I was expecting to be able to log into site2 thusly: http://site2.com/system but this url doesn’t work (broken link)

    If I use the global_edit_this on site 2 ({if author_id == logged_in_member_id OR logged_in_group_id == "1" OR logged_in_group_id =="6"}Edit{/if})

    Then it takes me to the CP home page (site1) and doesn’t take me to the publish page of the respective article.
    How can I get the global_edit_this to work for site2? I’ve tried adding &site=site2 but this doesn’t work…?

    Many thanks in advance.

    Simon

  • #8 / Feb 28, 2011 8:17am

    Sue Crocker

    26054 posts

    Hi, Simon. What I did was have two different sites, and used the config.php setting. I then made sure I had no cookies for either site, logged into the first site, then went to the second site. In the second site I had code that checked for if logged_in. That code worked for me.

    However, that’s a different issue than what you’re describing. You won’t have a site2.com/system, you’d have an admin.php that you made by taking the /system/index.php from the first site, and then renamed it to admin.php for the second site.

    That’s called Masking the Control Panel - http://ellislab.com/expressionengine/user-guide/installation/masked_cp_access.html

    Is that what you’re after, perhaps?

  • #9 / Mar 02, 2011 5:33am

    Loquela

    105 posts

    Hi there,

    Thanks Sue. I think Masking is what I want to do.

    You can close this now.

    L.

  • #10 / Mar 02, 2011 6:32am

    Sue Crocker

    26054 posts

    Sounds good, Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases