Recover Id Joomla user in EB

  • ROSSINELLI
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 4 months ago #53000 by ROSSINELLI
Recover Id Joomla user in EB was created by ROSSINELLI
How to recover in a field EB ID or username of a joomla user ?
thank you

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #53009 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Recover Id Joomla user in EB
Hi

In EB, the ID of Joomla user is stored in user_id column of #__eb_registrants table. So you will need to write a SQL join query to get ID of the registrant. Below is sample code :
Code:
$registrantId = 10; $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('a.username') ->from('#__users AS a') ->innerJoin('#__eb_registrants AS b ON a.id = b.user_id') ->where('b.id = '. $registrantId); $db->setQuery($query); $username = $db->loadResult();

Hope this helps

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc