Forums

How to display Joomla User information and or CB information

fduchesne 31 Jan, 2013
Hello,

my question is simple:

How to diplay in my form somes users information, login, email..etc..

and in plus, is it possible to display information from Communitity Builder ?

Thanks for your response.

Best Regards.

Fred
GreyHead 09 Feb, 2013
Hi Fred,

Please see this FAQ about getting information about Joomla! Users.

I don't know much about K2 but I expect that you could use a DB Record Loader action to query the K2 tables if you know how they are set up. Or K2 may have a method that they use to get User information.

Bob
jimmyt 22 May, 2013
I am using Chronoforms 3.2 (I believe) under Joomla 1.5. Following the instructions at the FAQ above, I added

<?php
$user =& JFactory::getUser();
$form->data['user_id'] = $user->id;
?>


In the "On Submit code - before sending email: " section for a form.

Then in the email template I added:

Logged in as: {user_id}


However, the only thing I see in the actual email is:

Logged in as: {user_id}



What did I do wrong?

Thanks
GreyHead 23 May, 2013
Hi

For ChronoForms 3.2 please try replacing
$form->data['user_id'] = $user->id;
with
JRequest::setVar('user_id',$user->id);


Bob
jimmyt 23 May, 2013
Yes, that worked -- thanks!
This topic is locked and no more replies can be posted.