add config cis_send_profil_update_mails, use it in profil update controllers

This commit is contained in:
Harald Bamberger
2024-12-04 09:15:44 +01:00
parent af2f3348b4
commit d30ba24d2f
3 changed files with 23 additions and 0 deletions
@@ -47,6 +47,8 @@ class ProfilUpdate extends FHCAPI_Controller
'show' => self::PERM_LOGGED,
]);
$this->load->config('cis');
// Load language phrases
$this->loadPhrases(
array(
@@ -504,6 +506,11 @@ class ProfilUpdate extends FHCAPI_Controller
private function sendEmail_onProfilUpdate_insertion($uid, $profil_update_id, $topic)
{
$this->addMeta('cis_send_profil_update_mails', $this->config->item('cis_send_profil_update_mails'));
if($this->config->item('cis_send_profil_update_mails') === false)
{
return;
}
$this->load->helper('hlp_sancho_helper');
$emails = [];
@@ -573,6 +580,11 @@ class ProfilUpdate extends FHCAPI_Controller
private function sendEmail_onProfilUpdate_response($uid, $topic, $status)
{
if($this->config->item('cis_send_profil_update_mails') === false)
{
return;
}
$this->load->helper('hlp_sancho_helper');
$email = $uid . "@" . DOMAIN;