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