Support

  1. Eric
  2. General
  3. Tuesday, November 11 2014, 07:53 PM
Hi,
For our cycling club we would like to give users the option to change their address, phone number etc.
Is it possible to send an e-mail to an admin when a user has updated his profile?
Preferably with the old and new data?

Thanks,
Eric
Accepted Answer
admin Accepted Answer
Admin
Hi,
yes, in body of email you can add user variables, see docs at https://www.easy-profile.com/docs/44-triggers.html

example you can construct body of email with this:
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
'[email protected]', // Receiver Mail
'Profile Updated', // Subject Mail
$body // Body Mail
);


}
}
  1. more than a month ago
  2. General
  3. # Permalink
admin Accepted Answer
Admin
Hi,
My skeleton plugin is:

seems ok.

We request FTP access only in rare cases, and we use it only for debug, an alternative is component like extplorer

Have you updated only Easy Profile component or entire package?
  1. more than a month ago
  2. General
  3. # 1
Eric Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Can you reproduce the problem?
No because we can't see any mail, you send a mail on your email address

For which purpose do you need ftp access?
With backend access we have tried to copy all your configuration of this field on our test site, to try to reproduce the problem. Unfortunately on our site everything went well so we can not understand the problem.
We need to debug our User Plugin (this plugin trigger skeleton) and your Skeleton plugin to check what causes this.
  1. more than a month ago
  2. General
  3. # 3
Eric Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. General
  3. # 4
admin Accepted Answer
Admin
Sorry but I not found problem, you can post also FTP access?
  1. more than a month ago
  2. General
  3. # 5
Eric Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. General
  3. # 6
admin Accepted Answer
Admin
Hi
sorry for late reply,

We send you a PM with our IP address
  1. more than a month ago
  2. General
  3. # 7
Eric Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. General
  3. # 8
admin Accepted Answer
Admin
Hi,
sorry but I can't access, when I go on /administrator/ the site redirect to 404 page :(
  1. more than a month ago
  2. General
  3. # 9
Eric Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. General
  3. # 10
admin Accepted Answer
Admin
Do you need admin login?
Yes please, we not found the problem for now. :(
  1. more than a month ago
  2. General
  3. # 11
Eric Accepted Answer
Basic
I cannot add the skeleton file as the reply form does not work then
  1. more than a month ago
  2. General
  3. # 12
admin Accepted Answer
Admin
Hi,
yesterday we have made some tests and no found your problem. Can you please post me your site details to check your configuration?
  1. more than a month ago
  2. General
  3. # 13
Eric Accepted Answer
Basic
I use the latest version: Easy Profile Basic 1.3.9
  1. more than a month ago
  2. General
  3. # 14
admin Accepted Answer
Admin
Which version of Easy Profile you use?
  1. more than a month ago
  2. General
  3. # 15
Eric Accepted Answer
Basic
Now that our website is live, we notice that the above code always marks a field of the type 'selectlist' as changed, even if it is not.
Can this be fixed?
  1. more than a month ago
  2. General
  3. # 16
Eric Accepted Answer
Basic
Fantastic that did the trick! Just for those who will use this as well: add one } on line 8?

Thanks, Eric
  1. more than a month ago
  2. General
  3. # 17
Eric Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. General
  3. # 18
admin Accepted Answer
Admin
Hi,
yes but you need to create a simple plugin, follow these steps:
- Download, install and enable our skeleton plugin (you can find it here https://www.easy-profile.com/docs/44-triggers.html)
- open this file /plugins/jsn/skeleton/skeleton.php
- remove samples function triggerFieldAvatarUpdate and triggerProfileUpdate
- add this function
public function triggerProfileUpdate($user, $data, $changed, $isNew)
{
if(!$isNew)
{
JFactory::getMailer()->sendMail(
$user->email, // Sender Mail
$user->name, // Sender Name
'[email protected]', // Receiver Mail
'Profile Updated', // Subject Mail
$user->name.' updated user profile.' // Body Mail
);
}
}

replace [email protected] with you admin email

NOTE: This code is not supported and required minimum PHP and Joomla Knowledge
  1. more than a month ago
  2. General
  3. # 19
  • 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.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.