Bug in "Resend Activation Emails"

11 years 4 months ago #61959 by e_builds
Thanks so far, B0ris. You set me on the way to further investigate this.
Check comprofiler.class.php around line 4965:
[code:1]if ( $row->cbactivation ) {
$confirmCode = $row->cbactivation;
} else {
$confirmCode = ''; // this was registrations-confirm codes before 1.0.2, removed at 1.1: md5($row->id);
}[/code:1]
Why was this removed at 1.1 ?
Anyway, seems your code belongs there, B0ris.

Checking it out further...

www.e-builds.com (A crappy sites is often proof of many customers holding you from your own site)
11 years 4 months ago #61961 by e_builds
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

www.e-builds.com (A crappy sites is often proof of many customers holding you from your own site)
11 years 4 months ago #62304 by beat
Thanks, fixed in CB 1.2 in the new CB user class. :)

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
11 years 1 month ago #70798 by kdeelstra
Hi, i yust installed cb yeserday so tis the last one,
but i get also empty confirmcode= emails

So its not corrected in CB 1.2 in the new CB user class?
11 years 1 month ago #70803 by yogiboy
Since the initial posting, I have upgraded to CB 1.2 RC2 and have not found another program for resending activation emails.
10 years 11 months ago #75824 by lgadola
I have installed CB 1.2 RC2 and still get emails with empty confirmcode.
Any news on this?
Thanks
Lukas
Moderators: beatnantkrileon
Time to create page: 0.401 seconds
Facebook Twitter Google LinkedIn