Buy Now
Sign in

ChronoConnectivity and Community Builder

stwgroup , March 02 2020, 19:48
S
stwgroup 5
March 02 2020, 19:48 #391454
I am using CCv6 and trying to use logged in user data in a where clause in a read data function. I can get the joomla user id by using {user:user_id}. However, I need a custom field from the CB user profile. I tried {user:cb_fieldname} but, that did not work. I feel like I need to initiate a CB session but not sure where that code should go.
Any suggestions will be appreciated...
healyhatman 9
March 02 2020, 21:59 #391460
You just need to use a read data action to get the appropriate value from the CB database tables, or just add a model (there's a handy add model button) to your existing read data. You'll have to play around with it to get it right, because there's no documentation on how it works when you're joining two tables, but it's definitely possible and not that hard once you know how.
To stop you wasting time doing anything else silly though, {user:} will show you all of the parameters it can access, which are all the ones available in the Joomla User object, so no none of the CB fields.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store