Events Made Easy Forums Bug fixed or feature request implemented EME_members php – Use of undefined constant wp_id ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #60702
    Anonymous
    Inactive

    I think I met a bug but I’m not quite sure.

    https://imgur.com/vYSO4DbScreen capture

    It comes from a template I made for membership by this shortcode :
    [eme_if tag='#_IS_USER_MEMBER_OF{FurWest 2019-2020}' value='0']

    The guilty 303 line :

    function eme_get_member_by_wpid_membershipid($wp_id,$membership_id,$status="") {
       global $wpdb;
       $members_table = $wpdb->prefix.MEMBERS_TBNAME;
       $persons_table = $wpdb->prefix.PEOPLE_TBNAME;
       $status_expired=MEMBER_STATUS_EXPIRED;
       if (empty($status)) {
    	   $cond_status="members.status != $status_expired";
       } elseif (strstr($status, ',')) {
    	   $cond_status="members.status IN ($status)";
       } else {
    	   $cond_status="members.status = $status";
       }
       <strong>$sql = $wpdb->prepare("SELECT members.* FROM $members_table as members, $persons_table as persons WHERE members.membership_id=%d AND $cond_status AND members.person_id=persons.person_id AND persons.wp_id=%d LIMIT 1",$membership_id,wp_id);
       return $wpdb->get_row($sql, ARRAY_A);</strong>
    }

    Could you please help me ?

    #61060
    Franky
    Keymaster

    This post got in my forum marked as “to approve”, so I missed it.
    But this got fixed some versions ago, thanks for posting it anyway!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top