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