Index: branches/5.3.x/units/affiliate_payments/affiliate_payments_config.php =================================================================== diff -u -N -r15656 -r15671 --- branches/5.3.x/units/affiliate_payments/affiliate_payments_config.php (.../affiliate_payments_config.php) (revision 15656) +++ branches/5.3.x/units/affiliate_payments/affiliate_payments_config.php (.../affiliate_payments_config.php) (revision 15671) @@ -1,6 +1,6 @@ 'af.PortalUserId', ), 'log' => Array ( - 'Username' => 'au.Username', + 'Username' => 'IF(au.Username = "", au.Email, au.Username)', 'PortalUserId' => 'af.PortalUserId', ), ), @@ -104,7 +104,7 @@ 'Fields' => Array ( 'AffiliatePaymentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'AffiliateId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'Users pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'', 'left_key_field' => 'AffiliateId', 'left_title_field' => 'Username', 'not_null'=>1,'default'=>0), + 'AffiliateId' => Array('type' => 'int','formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Affiliates af LEFT JOIN ' . TABLE_PREFIX . 'Users u ON u.PortalUserId = af.PortalUserId WHERE %s', 'left_key_field' => 'af.AffiliateId', 'left_title_field' => 'IF(u.Email = "", u.Username, u.Email)', 'not_null' => 1, 'default' => 0), 'PaymentDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), 'Amount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '1', 'required'=>1, 'default' => '0.00'), 'Comment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),