This debug message was to noisy but it is needed in development (where debug-mode...
[mailer.git] / inc / filter / user_filter.php
index 95f91b3df5aa24147397046fa5f009637200faec..1040aaee4e5f280d7c3103a9b4156553ffc558d9 100644 (file)
@@ -147,5 +147,31 @@ function FILTER_ADD_USER_DATA_CONVERT_SQL_COLUMNS ($sql) {
        return $sql;
 }
 
+// Filter for handling user subids (called by referral link)
+function FILTER_HANDLE_USER_SUBID ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+
+       // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=<pre>'.print_r($filterData,true).'</pre>';
+       return $filterData;
+}
+
+// Filter for adding SQL columns on user registration for subid
+function FILTER_SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+
+       // Is the sub id set in session?
+       if (isSessionVariableSet('subid')) {
+               // Okay, add subid here
+               addExtraRegistrationColumns(', `subid`');
+               addExtraRegistrationData(", '" . getSession('subid') . "'");
+       } // END - if
+
+       // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
+}
+
 // [EOF]
 ?>