"\r\n" in registration emails. Is it a C

17 years 10 months ago #15823 by algol
Hi!

I'm getting "\\r\\n" in registration emails in [DETAIL] lines like this:
[code:1]
"
(...)A sua conta com os segunites detalhes:
Email : marxy@somemail.pt\r\nNome de Utilizador : plokij\r\n
foi activada.(..)
"
[/code:1]

My first reaction was to go into the code and in class comprofiler, function _getUserDetails, changed '\\r\\n' to chr(13).
So, in file comprofiler.class.php, line 3256 I wrote:

[code:1]
$uDetails .= /*'\r\n'*/chr(13)._UE_UNAME.' : '.$row->username;//'\r\n';
if($includePWD==1) $uDetails .= chr(13)._UE_PASS.' : '.$row->password;//'\r\n';[/code:1]
It solves the problem. But that would be a too stupid bug for you (CB developers and users) not to have found it yet. So it must be something else.

In error log I get:
[code:1]
[client ***.**.**.61] PHP Parse error: parse error, unexpected T_STRING in /var/www/www.d***cao.pt/administrator/components/com_comprofiler/comprofiler.class.php(3207) : eval()'d code on line 14, referer: http://d****.pt/index.php?option=com_comprofiler&task=registers
[client ***.**.**.61] PHP Parse error: parse error, unexpected T_STRING in /var/www/www.d***cao.pt/administrator/components/com_comprofiler/comprofiler.class.php(3207) : eval()'d code on line 3, referer: http://www.******.pt/horde/imp/message.php?index=****&array_index=0
[client ***.**.**.61] PHP Parse error: parse error, unexpected T_STRING in /var/www/www.d***cao.pt/administrator/components/com_comprofiler/comprofiler.class.php(3207) : eval()'d code on line 12, referer: http://wwww.*****.pt/horde/imp/message.php?index=***&array_index=0
[/code:1]

By reading this I can say that there's an error in file comprofiler.class.php , line 3207. That is function sendFromSystem:
[code:1]
function sendFromSystem($toid,$sub,$message) {
global $database,$ueConfig,$mosConfig_sitename,$mosConfig_live_site;

$rowFrom=null;
$rowFrom->email = $ueConfig;
$rowFrom->name = $ueConfig;
$rowFrom->replytoEmail = $ueConfig;
$rowFrom->replytoName = $ueConfig;

if(!is_object($toid)) {
$query = "SELECT * FROM #__comprofiler c, #__users u WHERE c.id=u.id AND c.id =" . cbGetEscaped($toid);
$database->setQuery($query);
$rowTo = $database->loadObjectList();
$rowTo = $rowTo[0];
} else {
$rowTo = $toid;
}

$message=$this->_replaceVariables($message,$rowTo);
$message.="\n\n".sprintf(_UE_EMAILFOOTER,$mosConfig_sitename,$mosConfig_live_site);
(LINE:3207---->«»)eval ("\$message = \"$message\";"«»); (<----LINE:3207)

return $this->_sendEmailMSG($rowTo,$rowFrom,$mosConfig_sitename.'-'.$sub,$message,FALSE);

}
[/code:1]
Does any one have an ideia of what could it be?

Ricardo

PS-I'm using PHP 5

Post edited by: algol, at: 2006/06/22 16:03

Please Log in to join the conversation.

17 years 10 months ago #15841 by beat
Sorry, i'm stumped at first glance.

It works fine on all sites to my knowledge.

Looks like you must have some wierd php or joomla settings somewhere...

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.156 seconds

Facebook Twitter LinkedIn