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.

{if logged_out} being ignored

August 19, 2010 6:04am

Subscribe [2]
  • #1 / Aug 19, 2010 6:04am

    Clive Portman

    83 posts

    Hi,
    I have this:

    {if logged_out}
        
        <div id="purchase_login">
        <h3>Please login to continue</h3>
    <p>    {exp:member:login_form return="site/purchase/{segment_3}"}<br />
            <ul><br />
                <li><label for="username">Username:</label></li><br />
                <li><input type="text" name="username" value="" maxlength="32" id="username" /></li><br />
                <li><label for="password">Password</label></li><br />
                <li><input type="password" name="password" value="" maxlength="32" id="password" /></li><br />
                <li><input type="submit" name="submit" value="Submit >" id="submitbutton" ></li>                <br />
                <li id="forgotpassword">Click <a href="http://{path=%27member/forgot_password/&lt?php" title="Hit this link if you've forgotten your password">here</a> if you have forgotten your password.</li><br />
            </ul><br />
        {/exp:member:login_form}<br />
        </div><br />
        <br />
        <div id="purchase_register"><br />
            </p><h3>Don't have an account?</h3>
    <p>        <a href="http://{path=member/register}">Click here to register</a><br />
        </div><br />
    {if:else}<br />
    then show logged in content…<br />
    {/if}

    However, the {if logged_out} doesn’t seem to be working. I’m still testing this and when I want to register a new member, I’m hitting the ‘Click here to register’ link but getting the message “You are already registered and logged in.”

    Surely, if it knows I’m registered and logged in, why is it not responding to the {if logged_out} condition?

  • #2 / Aug 19, 2010 5:52pm

    Ingmar

    29245 posts

    You must not used advancec conditionals with {if logged_out}. Just try this

    {if logged_out}
    Out
    {/if}
    
    {if logged_in}
    In
    {/if}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases