OK, I adjusted it a bit and placed it in the class. You never know where else the class is misused.
SO, around line 4962 in "comprofiler.class.php", make the function like this:
[code:1]function _replaceVariables($msg, $row){
global $mainframe, $_CB_database, $mosConfig_live_site, $ueConfig, $mosConfig_emailpass;
if($ueConfig==1) {
if ( $row->cbactivation ) {
$confirmCode = $row->cbactivation;
} else {
$row->cbactivation =
"reg" . md5( cbMakeRandomString() ) .
sprintf( "%08x", ((int) hexdec(substr( md5 ( $mainframe->getCfg( 'secret' ) . $mainframe->getCfg( 'db' ) ), 0, 7)))
^ ( (int) $row->id ) );
$_CB_database->setQuery( "UPDATE #__comprofiler "
. "\n SET cbactivation='".$row->cbactivation."' "
. "\n WHERE user_id='".$row->id."' "
);
$_CB_database->query();
$confirmCode = $row->cbactivation;//$row->cbactivation; // this was registrations-confirm codes before 1.0.2, removed at 1.1: md5($row->id);
}[/code:1]
Post edited by: e_builds, at: 2008/04/30 13:32
Post edited by: e_builds, at: 2008/04/30 13:32