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.

Logged In Issues

January 24, 2011 4:54pm

Subscribe [4]
  • #1 / Jan 24, 2011 4:54pm

    mzuser

    47 posts

    I’m using MSM to setup a site, and a separate employee only site that requires a login. However, even when I’m logged out, my conditional isn’t working. It’s still showing me logged in and I’m able to access the content. Here’s what my template looks like:

    {if logged_in}
    {embed="includes/header"}
    
    {exp:weblog:entries}
    
    {content}
    
    {/exp:weblog:entries}
        
    {embed="includes/footer"}
    
    {/if}
    
    {if logged_out}
    
       {redirect="login"}
    
    {/if}
  • #2 / Jan 24, 2011 4:57pm

    Ingmar

    29245 posts

    There is no else with {if logged_in}. Try {if logged_out} instead.

  • #3 / Jan 24, 2011 4:59pm

    mzuser

    47 posts

    I actually do have an if logged out statement sorry. When I compressed my code for the post I changed it to if:else. But in my actual code I have to separate conditionals.

  • #4 / Jan 25, 2011 10:22am

    Sue Crocker

    26054 posts

    If you put the simplified code in its own template, does that work?

  • #5 / Jan 25, 2011 11:00am

    mzuser

    47 posts

    Yeah I simplified it just to show a hello world and it still shows up.

  • #6 / Jan 26, 2011 2:36am

    John Henry Donovan

    12339 posts

    matthewordie,

    Can you add the following to your simplified template.
    Nothing else in the template only this and let me know what your group ID is please

    <h1>My Group ID is {group_id} and 
    {if logged_in}
    
     I'm logged out
    {/if}
    
    {if logged_out}
    
    I'm logged out
    
    {/if}</h1>

    Can you also let us know the version and build of both EE and MSM.
    Are you testing as a SuperAdmin or logged in as the employee as the other MSM site?

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

ExpressionEngine News!

#eecms, #events, #releases