• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Get Email from joomla component 3rd part ?

Get Email from joomla component 3rd part ? 7 years 1 month ago #38056

  • destek
  • destek's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hello dear rs team,

how can i get email from database 3rd part component is it possible to do that ???
i made a form with bootstrap 3 for copy of the form has to be send to the owner of the entry...

this code i have modify but wont work....

//<code>
// Get a database connection.
$db = JFactory::getDbo();

// Get the current article ID from the URL.
$articleId = JRequest::getInt('id');

// Setup the query.
$db->setQuery("SELECT created_by FROM #__content WHERE `id`='".$db->escape($articleId)."'");
$createdBy = $db->loadResult();
if ($createdBy) {
// Get the user based on the created_by column value.
$user = JFactory::getUser($createdBy);

// Return the email address.
return $user->get('email');
}
//</code>

component select from
$db->setQuery("SELECT created_by FROM #__marketplace_entries WHERE `id`='".$db->escape($entry_id)."'");

need your help
thx in advance
The administrator has disabled public write access.

Get Email from joomla component 3rd part ? 7 years 1 month ago #38061

  • destek
  • destek's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
i have try this code but the variable is still missed the email is always the same from db
how get variable ???

//<code>
$db =& JFactory::getDBO();
$db->setQuery("SELECT email FROM #__marketplace_entries");
$result = $db->loadResult();
return $result;
//</code>
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!