Skip to content

Commit

Permalink
Add user account ID to warning email
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcon committed Oct 6, 2021
1 parent dc192d3 commit 67d74eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/RemoveInactiveUsersRunner.php
Expand Up @@ -70,6 +70,7 @@ function deleteUser($user, $em){

function sendWarningEmail($user){
$userEmail = $user->getEmail();
$accountId = $user->getCertificateDn();

// Email content
$headers = "From: no-reply@goc.egi.eu";
Expand All @@ -79,7 +80,7 @@ function sendWarningEmail($user){
$localInfoXML = simplexml_load_file ( $localInfoLocation );
$webPortalURL = $localInfoXML->local_info->web_portal_url;

$body = "Dear GOCDB User,\n\n" . "Your account has not signed in for the past 17 months and is due for deletion in 30 days.\n\n" .
$body = "Dear GOCDB User,\n\n" . "Your account (ID:". $accountId .") has not signed in for the past 17 months and is due for deletion in 30 days.\n\n" .
"You can prevent this by simply signing in at:\n\n" . $webPortalURL . "\n\n";

// Handle all mail related printing/debugging
Expand Down

0 comments on commit 67d74eb

Please sign in to comment.