Support

  1. [email protected]
  2. Support
  3. Wednesday, August 19 2015, 11:18 AM
Hello

I have added 2 new fields to the registration form.

The admin receive from Joomla the default email to activate the new registered user. But my admin needs to see the value of these 2 new custom fields added with Easy Profile inside the mails that is sent by joomla to all Administrators.

Is there a way to do that ?

Thanks !
admin Accepted Answer
Admin
Hi,
as we said here https://www.easy-profile.com/support/display-value-of-custom-fields-to-sent-emails.html#reply-8818
Easy Profile not do this, you need to write a plugin that send a second email with user data.

I think you need some tools offered by software like Acymailing to customize system email.
  1. more than a month ago
  2. Support
  3. # 1
wirecreative Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
sorry but I don't undestand what you want to do.

if you have a language constant called MYCONSTANT with this value
Hello administrator,\n\n

A new user has registered at %s.\nThe user has verified their email address and requests that you approve their account.\nThis email contains their details:\n\n

Name : %s \n
email: %s \n
Username: %s \n\n

You can activate the user by selecting on the link below:\n %s \n


then you can use this function to replace "%s" texts with your values:
$output=JText::sprintf ( 'MYCONSTANT', 'Jonh Doe' , 'Jonh Doe' , '[email protected]' , 'jonhdoe' , 'http://somelink' );


$output will be:

Hello administrator,\n\n

A new user has registered at Jonh Doe.\nThe user has verified their email address and requests that you approve their account.\nThis email contains their details:\n\n

Name : Jonh Doe \n
email: [email protected] \n
Username: jonhdoe \n\n

You can activate the user by selecting on the link below:\n http://somelink \n
  1. more than a month ago
  2. Support
  3. # 3
wirecreative Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Support
  3. # 4
admin Accepted Answer
Admin
Yes, you can use sprintf function,

Example:
JText::sprintf( 'YOUR_LANGUAGE_CONSTANT' , $value );

Your language constant "YOUR_LANGUAGE_CONSTANT" should have value like this: "Your value is %s"
  1. more than a month ago
  2. Support
  3. # 5
wirecreative Accepted Answer
Pro
I have a similar issue. Is it not possible to create a language override for the email that gets sent and insert these custom fields as tokens in the override text?
  1. more than a month ago
  2. Support
  3. # 6
admin Accepted Answer
Admin
Hi,
no sorry this is not possible, "new account" email is sent by Joomla not Easy Profile.

To do this you can develop simple plugin to send second email with user data.

Here an example: https://www.easy-profile.com/support/email-notification.html

You function may be like this:
public function triggerProfileUpdate($user, $data, $changed, $isNew)
{
if($isNew)
{
$body=$user->name." registration. \n\n";
$body.="Field Title 1: ".$data[ 'alias_of_field1' ]."\n";
$body.="Field Title 2: ".$data[ 'alias_of_field2' ]."\n";
$body.="Field Title 3: ".$data[ 'alias_of_field3' ]."\n"
..........
$result=JFactory::getMailer()->sendMail(
$user->email, // Sender Mail
$user->name, // Sender Name
'PUT HERE YOUR EMAIL ADDRESS', // Receiver Mail
'Profile Registered', // Subject Mail
$body // Body Mail
);
}
}


NOTE: this code is not tested and not supported, this is only for example purpose.
  1. more than a month ago
  2. Support
  3. # 7
  • 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 Online

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.