if (getConfig('ref_payout') > 0) $locked = 'locked_points';
// @TODO Rewrite this to addPointsDirectly()
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`, `ref_depth`, `".$locked."`) VALUES (%s,0,'%s')",
- array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__);
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`, `ref_depth`, `".$locked."`) VALUES (%s,0,'{?points_register?}')",
+ array(bigintval($userid)), __FILE__, __LINE__);
// Update mediadata as well
if ((getExtensionVersion('mediadata') >= '0.0.4') && ($locked == 'points')) {