Commit 4e5c794e authored by Romain Therville's avatar Romain Therville 🐭

Update concerning the send_purge_demand_mail() method, to send the mail

to every member, administrator and manager.
issue#127
parent 086d87fb
......@@ -126,12 +126,15 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$purge_email_to="";
$purge_user_id_to=Array();
if ( count( $users_emails['manager']) >= 1 ) {
if ( count( $users_emails['manager']) > 1 ) {
$email_warn="Be aware that this project is associated to several managers (all received this email), please send only one answer per purge alert number.\n";
}
$purge_email_to=join(',', $users_emails['manager']);
$purge_user_id_to=$users_id['manager'];
if ( count( $users_emails['manager']) > 1 ) {
$email_warn="Be aware that this project is associated to several managers (all received this email), please send only one answer per purge alert number.\n";
}
$users_emails_to = array_merge($users_emails['administrator'],$users_emails['manager'],$users_emails['member']);
$purge_user_id_to = array_merge($users_id['administrator'],$users_id['manager'],$users_id['member']);
$purge_email_to = join(', ',$users_emails_to );
} elseif ( count($users_emails['manager']) == 0) {
if( count( $users_emails['member']) >= 1){
$users_emails_to = array_merge($users_emails['administrator'],$users_emails['member']);
$purge_user_id_to=array_merge($users_id['administrator'],$users_id['member']);
......@@ -139,13 +142,14 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$users_emails_to = $users_emails['administrator'];
$purge_user_id_to=array_merge($users_id['administrator']);
}
$purge_email_to=join(', ',$users_emails_to );
$email_warn="As this project do not have managers, administrators and members recieved this alert.\n";
$email_warn.= " - Administrator(s): ".join(', ',$users_emails['administrator']). "\n";
$email_warn.= " - Members(s): ".join(', ',$users_emails['member']). "\n";
}
}
//Retrieve purgeable information for email
$run_info=Array();
$analyses_info=Array();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment