diff --git a/src/FamilyEditor.php b/src/FamilyEditor.php index ea98a63122..8dd4b1d553 100644 --- a/src/FamilyEditor.php +++ b/src/FamilyEditor.php @@ -241,6 +241,13 @@ $family = new \ChurchCRM\model\ChurchCRM\Family(); if ($iFamilyID >= 1) { $family = FamilyQuery::create()->findPk($iFamilyID); + $family + ->setDateLastEdited(date('YmdHis')) + ->setEditedBy(AuthenticationManager::getCurrentUser()->getId()); + } else { + $family + ->setDateEntered(date('YmdHis')) + ->setEnteredBy(AuthenticationManager::getCurrentUser()->getId()); } $family ->setName($sName) @@ -252,8 +259,6 @@ ->setHomePhone($sHomePhone) ->setWorkPhone($sWorkPhone) ->setCellPhone($sCellPhone) - ->setDateEntered(date('YmdHis')) - ->setEnteredBy(AuthenticationManager::getCurrentUser()->getId()) ->setSendNewsletter($bSendNewsLetterString) ->setEnvelope($nEnvelope); if ($dWeddingDate) { diff --git a/src/PersonEditor.php b/src/PersonEditor.php index 3ac7c89c16..1e930ea348 100644 --- a/src/PersonEditor.php +++ b/src/PersonEditor.php @@ -384,6 +384,13 @@ $personAlreadyExist = $iPersonID > 0; if ($personAlreadyExist) { $person = PersonQuery::create()->findOneById($iPersonID); + $person + ->setDateLastEdited(date('YmdHis')) + ->setEditedBy(AuthenticationManager::getCurrentUser()->getId()); + } else { + $person + ->setDateEntered(date('YmdHis')) + ->setEnteredBy(AuthenticationManager::getCurrentUser()->getId()); } $person @@ -410,8 +417,6 @@ ->setFamId($iFamily) ->setFmrId($iFamilyRole) ->setClsId($iClassification) - ->setDateEntered(date('YmdHis')) - ->setEnteredBy(AuthenticationManager::getCurrentUser()->getId()) ->setFlags($per_Flags) ->setFacebook($sFacebook) ->setTwitter($sTwitter)