If you still want to use the name of the membership instead of the id use this code:
Code:
$userinfo = func_query_first("SELECT A.login,A.firstname,A.lastname,B.membership FROM $sql_tbl[customers] A, $sql_tbl[memberships] B WHERE A.login='$login' and A.membershipid = B.membershipid");
$smarty->assign("userinfo", $userinfo);
and this in your .tpl file:
Code:
{if $userinfo.membership eq "Gold Member"}