- array($hash), __FILE__, __LINE__);
-
- // Was it updated?
- if (!ifSqlHasZeroAffectedRows()) {
- // Send email if updated
- $message = loadEmailTemplate('guest_user_confirmed', $content, bigintval($userid));
-
- // And send him right away the confirmation mail
- sendEmail($userid, '{--GUEST_THANX_CONFIRM--}', $message);
-
- // Maybe he got "referraled"?
- if ((isValidId($refid)) && ($refid != $userid)) {
- // Select the referral userid
- if (fetchUserData($refid)) {
- // Update ref counter...
- updateReferralCounter($refid);
-
- // If version matches add ref bonus to refid's account
- if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (isBonusRallyeActive())) {
- // Add points (directly only!)
- sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_ref`=`bonus_ref`+{?bonus_ref?} WHERE `userid`=%s LIMIT 1",
- array(bigintval($refid)), __FILE__, __LINE__);
-
- // Subtract points from system
- handleBonusPoints(getBonusRef(), $refid);
- } // END - if