Hello, Very simple question... I'm trying to load referral info using aff_id to show in users members area. Code was placed in main.phtml <?php $aff = Am_Di::getInstance()->userTable->load($member->aff_id); echo $aff->getName(); ?> Its saying there was a problem to find info on database... Any ideas what could be wrong? Thanks marcioarc
try the following code and please always please copy/paste error messages! PHP: $di = Am_Di::getInstance();// get aff_id of currently logged-in user$aff_id = $di->auth->getUser()->aff_id;echo "Aff#=$aff_id\n"; // debug// try to load, second parameter allows to fail silently if record not found$aff = $di->userTable->load->($di->auth->getUser()->aff_id, false);if ($aff) print_r($aff->toArray()); // debugecho $aff->getName();