♻️ code clean-up

This commit is contained in:
Marc Koch 2025-04-01 18:15:37 +02:00
parent 5a424771fd
commit a94a9baf4c
Signed by: marc.koch
GPG key ID: 12406554CFB028B9
4 changed files with 10 additions and 23 deletions

View file

@ -174,26 +174,6 @@ function mailinglistsync_civicrm_validateForm($formName, &$fields, &$files, &$fo
}
}
function mailinglistsync_civicrm_pre($op, $objectName, $objectId, &$params) {
if ($op === 'delete' || $op === 'edit') {
if ($objectName === 'Group' || $objectName === 'Event') {
$mailingList = $objectName === 'Group'
? new GroupMailingList($objectId)
: new EventMailingList($objectId);
if ($mailingList->isEnabled()) {
// If email has changed, delete the mailing list and create a new one
if ($mailingList->getEmailAddress() !== $params['email']) {
//
}
}
}
}
}
/**
* Implements hook_civicrm_post() to check on permissions to alter mailing list
* groups and sync group with mlmmj.