Message for users signed up before certain date

Discussion in 'Templates customization' started by mdmr_llc, Feb 11, 2012.

  1. mdmr_llc

    mdmr_llc aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    57
    I need to post a message on member.php for users that signed up before February 10.

    How do I target these users? Can I do something like:
    PHP:
    {php}
    if (
    $payment[_amember_subscriptions][begin_date] < 2012-02-10) {
    echo 
    'message here';
    {/
    php}
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Here is the code:
    PHP:
    {php}
    $min_date date('Y-m-d');
    foreach(
    $db->get_user_payments($_SESSION[_amember_id],1) as $p){
      if(
    $p[completed] && $p['begin_date'] < $min_date$min_date $p['begin_date'];
    }
    if(
    $min_date<'2012-02-10') print "message";
    {
    php}

Share This Page