Skip to content

Commit

Permalink
#8374 Missing bool return tasks updated
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir authored and asmecher committed Nov 3, 2022
1 parent 3176f96 commit 59b627f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions classes/task/DepositDois.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ protected function executeActions()
foreach ($contextIds as $contextId) {
dispatch(new DepositContext($contextId));
}

return true;
}
}
2 changes: 2 additions & 0 deletions classes/task/EditorialReminders.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,7 @@ protected function executeActions()
ScheduledTaskHelper::SCHEDULED_TASK_MESSAGE_TYPE_NOTICE
);
}

return true;
}
}
7 changes: 6 additions & 1 deletion classes/task/RemoveUnvalidatedExpiredUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ public function getName()
*/
public function executeActions()
{
// No need to remove invalidated users if validation requirement is turned off
if ( !Config::getVar('email', 'require_validation', false) ) {
return true;
}

$validationMaxDeadlineInDays = (int) Config::getVar('general', 'user_validation_period');

if ($validationMaxDeadlineInDays <= 0) {
return;
return true;
}

$dateTillValid = Carbon::now()->startOfDay()->subDays($validationMaxDeadlineInDays);
Expand Down

0 comments on commit 59b627f

Please sign in to comment.