display username, first name, email on thanks or member pages

Discussion in 'aMember Pro v.4' started by davidm1, Feb 21, 2012.

  1. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Whats the code to show a username/first name, email etc. in the thanks or internal members page?
    Used to be:
    {$smarty.session._amember_user.name_f}
    Now your using php code.

    Tried:
    <?php __e($user->name_f)?>

    Dont think this is documented yet?

    What about on pages created in the amember "protected pages" area?

    David
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This depends on template that you use.
    On thanks template there is no user variable, but tyou can get it in such way:
    PHP:
    <?php
    $user 
    $invoice->getUser();
    print 
    $user->login;
    ?>
    On protect pages you can't access aMember variables.
  3. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    on thanks getting the userid, but also got an error.
    Changed to this and it worked:
    <?php
    $uservar
    = $invoice->getUser();
    print
    $uservar->login;
    ?>

Share This Page