I'm building a reward system for user interaction, and I give reward points to someone when the person they invited logs in for the first time. I created a db query field, cb_referrer_id, to get the inviter's ID but somehow it doesn't work in my auto-action. It is just:
Code:
SELECT `user_id` FROM `#__comprofiler_plugin_invites` WHERE `user` = '[user_id]' LIMIT 1
I see it working ( the cb_referrer_id field ); it's set correctly when I look at the invited user's profile.
'[cb_referrer_id]' is also correctly translated in the auto-action SQL update.
On the condition I tried enabling "format" and then tried all 3 translate/format/prepare options. I've tried cb_referrer_id not empty and '> 0'. Debug says the condition fails. That's just picking the field "cb_referrer_id" from the select list.
If I use "Value" and "$( '#cb_referrer_id' )" "not empty", it does work. So I am just curious why above does not work.