Hub Asset Owner Name in Email

More
8 years 9 months ago - 8 years 9 months ago #6095 by donaldmoore
Hub Asset Owner Name in Email was created by donaldmoore
Hello, good day!
We need to be able to show the Asset owners name in the customer emails. I have been able to modify everything here needed except showing the username of the asset owner. We've been able to show the asset owners ID, but not the first and last name. Is there a variable already created for this or another way to do this?

Never mind! I've got it working now! Just used Joomla to do it in the reservation_complete_customer_html_inliner.php :
$lister = $displayData->created_by;
$user = JFactory::getUser($lister);
$owner = $user->username;
Last edit: 8 years 9 months ago by donaldmoore. Reason: [solved]

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

More
8 years 9 months ago #6100 by vietvh
Replied by vietvh on topic Hub Asset Owner Name in Email
Hi donaldmoore,

Glad you got it work for you now.

If you want to get the Solidres's customer data instead, you can use the following code:
$user = JFactory::getUser();
$customerTable = JTable::getInstance('Customer', 'SolidresTable');
				$customerTable->load(array('user_id' => $user->id));
				$customerFullName = $customerTable->customer_firstname . ' ' . $customerTable->customer_lastname;

Regards,

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

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?