// @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`=0 LIMIT 1",
array($userid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Add only when the line was not found (maybe some more secure?)
$locked = 'points';