Hi, any suggestion? I'd need to do this customization to a Wordpress website: 1. An affiliate (a) sends - through his link - a prospect (b) to my website (I run a membership). 2. The prospect (b) register to the membership Now, in a wordpress page I need to show to (b) the referring username (a) - in other words the guy showed here. I'm thinking about two solutions: 1. The best, would be to save the (a) username as a Custom User meta in Wordpress when the WP user is created. 2. or at least get - somehow - the referring username by a direct SQL query... I'm not asking you the solution I'd like to know if you think this is somehow possible or it's inhuman If you have any idea/suggestion to do this in the smartest way possible? Thanks. ^__^
I personally think the method 1 is better because you will update wordpress database only once and won't execute additional queries each time when you should display referred user info. Check function update_meta_tags in /amember/application/default/plugins/wordpress/wordpress.php To get referred user login use this code: if($user->aff_id){ $affiliate = Am_Di::getInstance()->userTable->load($user->aff_id); $login = $affiliate->login; }