display user name after loggin in.

Discussion in 'Templates customization' started by davidm1, May 28, 2006.

  1. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    I'm trying to use the following to display the users first name after logging on.
    {if $user.name_f}
    Hello {$user.name_f|escape}
    {else}
    <a href="/member.php">Please Login</a>
    {/if}

    However, it does not always work.

    Any suggestions?
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Where do you enter this?
  3. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    In the member.html template, I'd like to display the users 1st name.
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Just
    {$smarty.session._amember_user.name_f}
  5. elygen

    elygen New Member

    Joined:
    May 18, 2006
    Messages:
    1
    this should cover most of "how do i get the users name" type questions

    I did a print_r($_SESSION) and you will be amazed at what info you can retrieve

Share This Page