From 5e777375ca9a27a0f6665ab7c9764ede77ca8ac2 Mon Sep 17 00:00:00 2001 From: curiosity Date: Wed, 25 Oct 2023 11:51:36 +0200 Subject: [PATCH] add reactivation count to message --- classes/task/archive_user_task.php | 4 +++- lang/en/tool_cleanupusers.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/task/archive_user_task.php b/classes/task/archive_user_task.php index 58f0a93..290c11d 100644 --- a/classes/task/archive_user_task.php +++ b/classes/task/archive_user_task.php @@ -83,6 +83,7 @@ public function execute() { $result = $this->change_user_deprovisionstatus($reactivatearray, 'reactivate'); $unabletoactivate = $result['failures']; + $useractivated = $suspendresult['countersuccess']; $deleteresult = $this->change_user_deprovisionstatus($arraytodelete, 'delete'); $unabletodelete = $deleteresult['failures']; @@ -93,7 +94,8 @@ public function execute() { $admin = get_admin(); // Number of users suspended or deleted. $messagetext = get_string('e-mail-archived', 'tool_cleanupusers', $userarchived) . - "\r\n" .get_string('e-mail-deleted', 'tool_cleanupusers', $userdeleted); + "\r\n" .get_string('e-mail-deleted', 'tool_cleanupusers', $userdeleted) . + "\r\n" .get_string('e-mail-activated', 'tool_cleanupusers', $useractivated); // No Problems occured during the cron-job. if (empty($unabletoactivate) && empty($unabletoarchive) && empty($unabletodelete)) { diff --git a/lang/en/tool_cleanupusers.php b/lang/en/tool_cleanupusers.php index 67f9ca5..3691a1d 100755 --- a/lang/en/tool_cleanupusers.php +++ b/lang/en/tool_cleanupusers.php @@ -53,6 +53,7 @@ $string['waittodelete'] = 'The user is suspended and will not be deleted in the next cron-job.'; $string['e-mail-archived'] = 'In the last cron-job {$a} users were archived.'; $string['e-mail-deleted'] = 'In the last cron-job {$a} users were deleted.'; +$string['e-mail-activated'] = 'In the last cron-job {$a} users were reactivated.'; $string['errormessagenotactive'] = 'Not able to activate user'; $string['errormessagenotdelete'] = 'Not able to delete user'; $string['errormessagenotsuspend'] = 'Not able to suspend user';