function lPeopleVolRecViaAcct($lChapterID, $lACOID, $lUserID) { //--------------------------------------------------------------------- // create a people/volunteer rec based on the the info in // $this->userRec[0]; Update the peopleID in the db record; // return the new people ID. //--------------------------------------------------------------------- global $glUserID, $glChapterID; $holdUserID = $glUserID; $holdChapterID = $glChapterID; $glUserID = $lACOID; $glChapterID = $lChapterID; $ur =& $this->userRec[0]; $cp = new mpeople(); $cv = new mvol(); $cp->loadPeopleViaPIDs(-1, false, false); $pr =& $cp->people[0]; $pr->lHouseholdID = 0; $pr->lAttributedTo = null; $pr->strTitle = $ur->us_strTitle; $pr->strFName = $ur->us_strFirstName; $pr->strMName = ''; $pr->strLName = $ur->us_strLastName; $pr->strPreferredName = $ur->us_strFirstName; $pr->strSalutation = $ur->us_strFirstName; $pr->strAddr1 = $ur->us_strAddr1; $pr->strAddr2 = $ur->us_strAddr2; $pr->strCity = $ur->us_strCity; $pr->strState = $ur->us_strState; $pr->strCountry = $ur->us_strCountry; $pr->strZip = $ur->us_strZip; $pr->strPhone = $ur->us_strPhone; $pr->strCell = $ur->us_strCell; $pr->strNotes = ''; $pr->strEmail = $ur->us_strEmail; $pr->enumGender = 'Unknown'; $pr->dteExpire = null; $pr->lACO = $lACOID; $pr->dteMysqlBirthDate = null; $pr->dteMysqlDeath = null; $lPID = $cp->lCreateNewPeopleRec(); $cv->loadVolRecsViaVolID(-1, true); $vr =& $cv->volRecs[0]; $vr->lRegFormID = null; $vr->lPeopleID = $lPID; $vr->Notes = ''; $cv->lAddNewVolunteer(); $glUserID = $holdUserID; $glChapterID = $holdChapterID; return $lPID; }