]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/register_functions.php
Fixes for referal system, shell scripts overworked:
[mailer.git] / inc / libs / register_functions.php
index 21db407cb6e17c5e048ecb4999830992002255e7..0b2f58f63ada678355e1bc0fee6f818d5d5c4d3f 100644 (file)
@@ -293,7 +293,7 @@ function doRegistration () {
        if (isExtensionInstalledAndNewer('theme', '0.0.8')) {
                // Okay, add design here
                $GLOBALS['register_sql_columns'] .= ', `curr_theme`';
-               $GLOBALS['register_sql_data']    .= ", '" . getCurrentTheme() . "'";
+               $GLOBALS['register_sql_data']    .= ", '{%pipe,getCurrentTheme%}'";
        } // END - if
 
        // Check if I shall disable sending mail to newly registered members out about active/begging rallye
@@ -320,9 +320,9 @@ function doRegistration () {
        // 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`".$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()".$GLOBALS['register_sql_data'].")",
+('%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(
                $countryRow,
                substr(postRequestParameter('gender'), 0, 1),
@@ -356,12 +356,8 @@ function doRegistration () {
                return;
        } // END - if
 
-       // Is the refback extension there?
-       // @TODO Rewrite this to a filter
-       if (isExtensionActive('refback')) {
-               // Update refback table
-               updateRefbackTable($userid);
-       } // END - if
+       // Update referal table
+       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