Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
add reactivation count to message
Browse files Browse the repository at this point in the history
  • Loading branch information
my-curiosity committed Oct 25, 2023
1 parent 2fdfd8d commit 5e77737
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/task/archive_user_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand All @@ -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)) {
Expand Down
1 change: 1 addition & 0 deletions lang/en/tool_cleanupusers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 5e77737

Please sign in to comment.