]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/register_functions.php
Referal system refactured (and some parts fixed), wrapper function introduced:
[mailer.git] / inc / libs / register_functions.php
index 0b2f58f63ada678355e1bc0fee6f818d5d5c4d3f..c302d4742c3d668d84fd08f962fb8399aaba4991 100644 (file)
@@ -320,7 +320,7 @@ function doRegistration () {
        // Create user's account...
        SQL_QUERY_ESC("INSERT INTO
        `{?_MYSQL_PREFIX?}_user_data`
        // Create user's account...
        SQL_QUERY_ESC("INSERT INTO
        `{?_MYSQL_PREFIX?}_user_data`
-(`gender`, `surname`, `family`, `street_nr`,%s, `zip`, `city`, `email`, `birth_day`, `birth_month`, `birth_year`, `password`, `max_mails`, `receive_mails`, `refid`, `status`, `user_hash`, `REMOTE_ADDR`, `joined`, `last_update`,`ref_payout`".$GLOBALS['register_sql_columns'].")
+(`gender`, `surname`, `family`, `street_nr`,%s, `zip`, `city`, `email`, `birth_day`, `birth_month`, `birth_year`, `password`, `max_mails`, `receive_mails`, `refid`, `status`, `user_hash`, `REMOTE_ADDR`, `joined`, `last_update`, `ref_payout`".$GLOBALS['register_sql_columns'].")
        VALUES
 ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), {?ref_payout?}".$GLOBALS['register_sql_data'].")",
        array(
        VALUES
 ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), {?ref_payout?}".$GLOBALS['register_sql_data'].")",
        array(
@@ -360,8 +360,7 @@ function doRegistration () {
        updateReferalCounter($userid);
 
        // Write his welcome-points
        updateReferalCounter($userid);
 
        // Write his welcome-points
-       // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
-       addPointsDirectly('register_welcome', $userid, getPointsRegister());
+       addPointsThroughReferalSystem('register_welcome', $userid, getPointsRegister());
 
        // Write catgories
        if ((is_array(postRequestParameter('cat'))) && (count(postRequestParameter('cat')))) {
 
        // Write catgories
        if ((is_array(postRequestParameter('cat'))) && (count(postRequestParameter('cat')))) {