new user/registration email include all details?

18 years 2 months ago #7296 by sugardevil
I have looked everywhere for this answer and can't seem to find one anywhere, so any help would be greatly appreciated and a relief from pulling out my hair!

Community Builder is working great, I have it combined with MamboPal. However, when a new user registers, the admins get the "new user" email telling them someone just signed up. That email only includes their username, name, and email address though. I need it to include ALL of the fields i have created on the registration page (address, additional info, etc).

Is there a way to hack this in the CB english.php file? I found the spot where the details are called but dont know how to get it to get the additional fields.

Anyone??????

thanks in advance.
dana

Please Log in to join the conversation.

18 years 2 months ago #7312 by Craigomatic
Replied by Craigomatic on topic Re:new user/registration email include all details?
I did a quick hack for this the other day, the file is located at:

/administrator/components/com_comprofiler/comprofiler.class.php

On about line 3261 there is this function:

[code:1]function _replaceVariables($msg, $row)[/code:1]

Within it i changed it from being something like this:
[code:1]
$msg = str_replace("[USERNAME]", $row->username, $msg);
$msg = str_replace("[NAME]", $row->name, $msg);
$msg = str_replace("[EMAILADDRESS]", $row->email, $msg);
$msg = str_replace("[SITEURL]", $mosConfig_live_site, $msg);
$msg = str_replace("[DETAILS]", $this->_getUserDetails($row,$mosConfig_emailpass), $msg);
$msg = str_replace("[CONFIRM]", $confirmLink, $msg );
[/code:1]

...to something like this:

[code:1]
$msg = str_replace("[USERNAME]", $row->username, $msg);
$msg = str_replace("[NAME]", $row->name, $msg);
$msg = str_replace("[EMAILADDRESS]", $row->email, $msg);

changed here
$msg .= "Referred By: ".$row->cb_referredby."\n";
$msg .= "Company: ".$row->cb_company."\n";

$msg = str_replace("[SITEURL]", $mosConfig_live_site, $msg);
$msg = str_replace("[DETAILS]", $this->_getUserDetails($row,$mosConfig_emailpass), $msg);
$msg = str_replace("[CONFIRM]", $confirmLink, $msg );
[/code:1]

Its a little bit dodgy though, i have a feeling its now appending Referred By and Company to every email...

Hopefully this helps get you started!

Please Log in to join the conversation.

18 years 2 months ago #7315 by nant
No reason to hack!

Just add [cb_field] in your language file string.

Please Log in to join the conversation.

18 years 2 months ago #7386 by sugardevil
thanks for the help. I've tried both ways though and still nothing! I don't understand what I'm doing wrong. The above hack didn't work for me and just adding [cb_field] to the language file doesnt work either. Unless I'm putting it in the wrong spot... here's what i have in the english.php file:

[code:1]DEFINE ('_UE_REG_ADMIN_MSG','A new user has registered at [SITEURL].\n'

.'This email contains their details\n\n'

.'Name - [NAME]\n'

.'e-mail - [EMAILADDRESS]\n'

.'Username - [USERNAME]\n'

.'Address - [cb_address] \n\n\n'

.'Please do not respond to this message as it is automatically generated and is for information purposes only\n');[/code:1]

What is wrong with this?

Please Log in to join the conversation.

18 years 2 months ago #7392 by nant
Nothing wrong with this.
Are you using RC2?

It works just fine for me.

Please Log in to join the conversation.

18 years 2 months ago #7409 by sugardevil
I am not sure what version I'm using... the people at MamboPal installed it for me. Is there a way to check? All I know is i'm using Mambo 4.5.2.

when I try it that way, it just shows [cb_address] in the new user email, not the actual data.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.302 seconds

Facebook Twitter LinkedIn