Required fix for NULL vs. 0 in user_points
[mailer.git] / inc / libs / register_functions.php
index f1c329ea0b8b5f06d6ebb068aef9407e32033330..e98010cd6650e29d41e6d3f6477fa3ab2709b0cc 100644 (file)
@@ -305,7 +305,7 @@ function doRegistration () {
        } // END - if
 
        // Second: active rallye
-       if (!isBonusNewMemberNotifyEnabled()) {
+       if ((isExtensionActive('bonus')) && (!isBonusNewMemberNotifyEnabled())) {
                $GLOBALS['register_sql_columns'] .= ', `bonus_rallye_enable_notify`, `bonus_rallye_disable_notify`';
                $GLOBALS['register_sql_data']    .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()';
        } // END - if
@@ -339,7 +339,7 @@ function doRegistration () {
                generateHash(postRequestParameter('pass1')),
                bigintval(postRequestParameter('max_mails')),
                bigintval(postRequestParameter('max_mails')),
-               makeDatabaseUserId(postRequestParameter('refid')),
+               makeZeroToNull(postRequestParameter('refid')),
                $hash,
                detectRemoteAddr(),
        ), __FUNCTION__, __LINE__);