function _processProfileJoin($oAlert) { $oPC = new BxDolProfilesController(); //--- reparse profile tags $oTags = new BxDolTags(); $oTags->reparseObjTags('profile', $oAlert->iObject); //--- send new user notification if (getParam('newusernotify') == 'on') { $oPC->sendNewUserNotify($oAlert->iObject); } //--- Promotional membership if (getParam('enable_promotion_membership') == 'on') { $iMemershipDays = getParam('promotion_membership_days'); setMembership($oAlert->iObject, MEMBERSHIP_ID_PROMOTION, $iMemershipDays, true); } }
function registerMember() { $bEnAff = getParam('en_aff') == 'on'; $oPC = new BxDolProfilesController(); //convert to profile $aProfile = $this->oPF->getProfileFromValues($this->aValues[0]); //create it list($iMemID, $sStatus) = $oPC->createProfile($aProfile); if (!$iMemID) { return array(false, 'Fail'); } if ($this->bCouple) { //convert $aProfile = $this->oPF->getProfileFromValues($this->aValues[1]); //create list($iMem1ID, $sStatus1) = $oPC->createProfile($aProfile, false, $iMemID); if (!$iMem1ID) { $oPC->deleteProfile($iMemID); return array(false, 'Fail'); } } //send new user notification if (getParam('newusernotify') == 'on') { $oPC->sendNewUserNotify($iMemID); } // Affiliate and friend checking if ($bEnAff && $_COOKIE['idAff']) { $vRes = db_res("SELECT `ID` FROM `aff` WHERE `ID` = {$_COOKIE['idAff']} AND `Status` = 'active'"); if (mysql_num_rows($vRes)) { $vRes = db_res("INSERT INTO `aff_members` (`idAff`,`idProfile`) VALUES ('{$_COOKIE['idAff']}', '{$iMemID}')"); } } if ($bEnAff && $_COOKIE['idFriend']) { $iFriendID = getID($_COOKIE['idFriend']); if ($iFriendID) { $vRes = db_res("UPDATE `Profiles` SET `aff_num` = `aff_num` + 1 WHERE `ID` = '{$iFriendID}'"); createUserDataFile($iFriendID); } } reparseObjTags('profile', $iMemID); return array($iMemID, $sStatus); }