Forums

ChronoConnectivity with getUser()

carlsore 18 Sep, 2013
I'm trying to build a report page that returns all of the entries in a table created by the logged-in user (form created separately, user id stored in cf_created_by field).

I've researched, but I just can't figure out how to use the getUser function in the WHERE SQL box so that my query will filter appropriately.

Anyone tried this before?

Here's my code:
`cf_created_by` = 
'<?php
$user =& JFactory::getUser();
?>'
GreyHead 21 Sep, 2013
Hi carlsore,

Code like this is in the forums and FAQs dozens of times . . .
Please try:

<?php
$user =& JFactory::getUser();
echo " `cf_created_by` = {$user->id} ";
?>

Bob
This topic is locked and no more replies can be posted.