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

xen username

Discussion in 'XenForo Development Discussions' started by Colin Arenburg, Mar 4, 2012.

  1. Colin Arenburg

    Colin Arenburg New Member

    Hey there, i am wondering how i can display the currently logged in username. Also i would like to confirm that <xen:if is="{$visitor.user_id}"> is the id of the user right.
     
  2. Russ

    Russ Well-Known Member


    Code:
    {$visitor.username}
    
    And your code looks good.
     
    Trombones13 likes this.
  3. Colin Arenburg

    Colin Arenburg New Member

    Cool Thanks very much!
     
  4. Colin Arenburg

    Colin Arenburg New Member

    Hello Folks,

    I am testing on my devlopment site and i get an error
    This is the code on line 38-44
    PHP:
    <xen:if is="$visitor.user_id">
                <p> Welcome <?php $visitor.username?> what would you like to do today?</p>
     
            <xen:else />
                <p> Hello Looks like you are not logged in! You Should log in!</p>
                <?php login(); ?>
            </xen:if>
    I have tried it with the curly brackets around to, that just gives me an error. Unless i do not need the php tags, but that seems highly unlikely.
     

Share This Page