I have been the forum for at least the past 2-3 hours going around in circles trying to understand this...
I simply want to display the following custom fields in the body of the email if they change when the user updates their profile...
websiteurl
aboutme
phone
I did as as stated here https://www.easy-profile.com/support/custom-fields-in-admin-activation-email.html#reply-23320 and the skeleton.php file looks like this
<?php
/**
* @copyright Copyright (C) 2013 Jsn Project company. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @package Easy Profile
* website http://www.easy-profile.com
* Technical Support : Forum - http://www.easy-profile.com/support.html
*/
defined('_JEXEC') or die;
class PlgJsnSkeleton extends JPlugin
{
public function triggerProfileUpdate($user, $data, $changed, $isNew)
{
if(!$isNew)
{
$body=$user->name." updated user profile. \n\n";
foreach($changed as $fieldalias){
$body.=$fieldalias .": ". $data[$fieldalias] ."\n";
}
JFactory::getMailer()->sendMail(
$user->email, // Sender Mail
$user->name, // Sender Name
array( 'admin@mysite.com' ), // Receiver Mail
'Email Subject', // Subject Mail
$user->name.' updated their profile.' // Body Mail
);
}
}
}
?>
But for the life of me I do not understand WHERE or HOW I'm supposed to edit it to show the custom fields.
Every time I add something it throws an error page when I try to load the profile page.
Can someone please help me? Maybe show me an example in the code above?
Thank you!
Adina