1. FotoHijinx
  2. General
  3. Thursday, July 03 2014, 06:51 AM
Hi guys

I'm using Easyprofile Pro 1.3.2 for a membership site and I love it so far.

I need a requirement to have notification emails go out to a 2-3 people (not just site admin) when a member changes or updates their details. Is this possible?
Accepted Answer
admin Accepted Answer
Admin
Yes but require basic PHP Knowledge.

You can use our skeleton plugin to add this function.
1. Go to documentation page here: https://www.easy-profile.com/docs/44-triggers.html
2. Download, install and enable the skeleton plugin, you can find it at the end of documentation page.
3. Edit file /plugins/jsn/skeleton/skeleton.php
- delete functions triggerFieldAvatarUpdate and triggerProfileUpdate
- add a function like this:
function triggerProfileUpdate($user,$data,$changed){
$mailSender=$data['email'];
$mailSenderName=$data['name'];
$mailSubject='Change User Data';
$mailBody="I have changed following data:\n\n";
foreach($changed as $val)
{
$mailBody.=$val.": ".$data[$val]."\n";
}

// --- EMAIL 1
$mailReceiver='[email protected]'; // Receiver email
JFactory::getMailer()->sendMail(
$mailSender, // Sender Mail
$mailSenderName, // Sender Name
$mailReceiver, // Receiver Mail
$mailSubject, // Subject Mail
$mailBody // Body Mail
);

// --- EMAIL 2
$mailReceiver='[email protected]'; // Receiver email
JFactory::getMailer()->sendMail(
$mailSender, // Sender Mail
$mailSenderName, // Sender Name
$mailReceiver, // Receiver Mail
$mailSubject, // Subject Mail
$mailBody // Body Mail
);
}


NOTE: This code is an example to give you a idea. This code is not supported. Anyway I tested and work.;)
  1. more than a month ago
  2. General
  3. # Permalink
FotoHijinx Accepted Answer
Oh - I meant to add that I have easy profile connected to pay plans as well - if that makes any difference?
  1. more than a month ago
  2. General
  3. # 1
FotoHijinx Accepted Answer
Content Protected
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Hi,
you can add to body of email some code like this:
$body='<img src="'.$data['avatar'].'" />';


But there is one problem, JFactory::getMailer()->sendMail send plain text email, so you can enable the HTML content, I found this article to use this function..but I have not tried :(
  1. more than a month ago
  2. General
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.