Hello,
I am using Chronoforms V4, latest version, and Joomla! 2.5.8.
In one of my forms, i use the "Chronoforms Joomla! Registration" action and I miss the Joomla! option "Send password" in the activation mail sent to the user.
Note that this option should be present in Joomla! from version 2.5.5 and greater. (I think, but I haven't checked).
I patched Chronoforms with the attached patch and got it working.
It would be great if this patch will be included in future Chronoforms versions!
I just noted that the patch does not appear!
Maybe I forgot to upload it? 😶
Reporting it inline too:
-----
--- old/admin/form_actions/joomla_registration/joomla_registration.php 2013-01-11 10:54:02.000000000 +0100
+++ new/admin/form_actions/joomla_registration/joomla_registration.php 2014-01-20 11:04:15.077161000 +0100
@@ -193,6 +193,7 @@ class CfactionJoomlaRegistration{
$usersConfig = &JComponentHelper::getParams( 'com_users' );
$sitename = $mainframe->getCfg( 'sitename' );
$useractivation = $usersConfig->get( 'useractivation' );
+ $sendpassword = $usersConfig->get('sendpassword', 1);
$mailfrom = $mainframe->getCfg( 'mailfrom' );
$fromname = $mainframe->getCfg( 'fromname' );
$siteURL = JURI::base();
@@ -219,15 +220,29 @@ class CfactionJoomlaRegistration{
$data['sitename']
);
- $emailBody = JText::sprintf(
- 'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY',
- $data['name'],
- $data['sitename'],
- $data['siteurl'].trim($this->params->get('activation_link', '')).'&token='.$data['activation'],
- $data['siteurl'],
- $data['username'],
- $data['password_clear']
- );
+ if ($sendpassword)
+ {
+ $emailBody = JText::sprintf(
+ 'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY',
+ $data['name'],
+ $data['sitename'],
+ $data['activate'],
+ $data['siteurl'],
+ $data['username'],
+ $data['password_clear']
+ );
+ }
+ else
+ {
+ $emailBody = JText::sprintf(
+ 'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY_NOPW',
+ $data['name'],
+ $data['sitename'],
+ $data['activate'],
+ $data['siteurl'],
+ $data['username']
+ );
+ }
}
else if ($useractivation == 1)
{
@@ -242,15 +257,29 @@ class CfactionJoomlaRegistration{
$data['sitename']
);
- $emailBody = JText::sprintf(
- 'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY',
- $data['name'],
- $data['sitename'],
- $data['siteurl'].trim($this->params->get('activation_link', '')).'&token='.$data['activation'],
- $data['siteurl'],
- $data['username'],
- $data['password_clear']
- );
+ if ($sendpassword)
+ {
+ $emailBody = JText::sprintf(
+ 'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY',
+ $data['name'],
+ $data['sitename'],
+ $data['activate'],
+ $data['siteurl'],
+ $data['username'],
+ $data['password_clear']
+ );
+ }
+ else
+ {
+ $emailBody = JText::sprintf(
+ 'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY_NOPW',
+ $data['name'],
+ $data['sitename'],
+ $data['activate'],
+ $data['siteurl'],
+ $data['username']
+ );
+ }
} else {
$emailSubject = JText::sprintf(
Hi Diego,
Thank you for sharing this!🙂
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.