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
+2
View File
@@ -5,3 +5,5 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
// CMS Content Id for CIS4 Menu Root
$config['cis_menu_root_content_id'] = 11066;
// send Mails for ProfilUpdate
$config['cis_send_profil_update_mails'] = true;
@@ -36,6 +36,7 @@ class ProfilUpdate extends Auth_Controller
'getTopic' => ['basis/cis:r'],
]);
$this->load->config('cis');
$this->load->model('person/Profil_update_model', 'ProfilUpdateModel');
$this->load->model('person/Kontakt_model', 'KontaktModel');
@@ -111,6 +112,10 @@ class ProfilUpdate extends Auth_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;
@@ -138,6 +143,10 @@ class ProfilUpdate extends Auth_Controller
private function sendEmail_onProfilUpdate_insertion($uid, $profil_update_id, $topic)
{
if($this->config->item('cis_send_profil_update_mails') === false)
{
return;
}
$this->load->helper('hlp_sancho_helper');
$emails = [];
@@ -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;