How To print membership level of the member

Discussion in 'Templates customization' started by hhart, Apr 22, 2007.

  1. hhart

    hhart New Member

    Joined:
    Apr 13, 2007
    Messages:
    7
    I am using the code:
    <?php
    session_start();
    $user = $_SESSION['_amember_user'];
    if ($user['member_id'] > 0){
    print "Hello $user[name_f] $user[name_l] <br>\n";
    print "Your E-Mail address is $user <br>\n";
    print "Your subscription status is $user[status] <br>\n";
    } else {
    print "You are not logged-in";
    }
    ?>


    I want to print the membership level(s) that the member is subcribed to.

    Can someon give me the code for this?

    Thanks
    H
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Well, you can try
    print $_SESSION['_amember_products'][0]['title'];
  3. ezminisites

    ezminisites New Member

    Joined:
    Jul 3, 2006
    Messages:
    40
    To add the Membership Level to the output of the Joomla Amember Plugin: mod_amemberl.php

    This is the php:

    PHP:
    if ($my->id) {

        echo _HI; ?><?php echo $my->username;?>

        <br /><br />
        Welcome to Your Membership Club. Thank you for joining us.
    <br /><br />Your Membership is: <?php
    session_start
    ();
    $user $_SESSION['_amember_user'];
    if (
    $user['member_id'] > 0){
    print 
    $_SESSION['_amember_products'][0]['title'];
    }
    ?>
    <br /><br />

        <a href="<?php echo sefRelToAbs("/amember/logout.php"); ?>"><?php echo _BUTTON_LOGOUT?></a>

        |

        <a href="<?php echo sefRelToAbs("/amember/member.php"); ?>"><?php echo "Edit Profile"?></a>
    Worked for me, (although not pretty) ... your mileage may vary!

    DJ

Share This Page