Skip to content
Snippets Groups Projects

Cron functions should never care about the current user

1 unresolved thread
Files
5
@@ -704,6 +704,7 @@ function file_cron() {
// is disabled if $age set to 0.
if ($age) {
$fids = Drupal::entityQuery('file')
->accessCheck(FALSE)
Please register or sign in to reply
->condition('status', FILE_STATUS_PERMANENT, '<>')
->condition('changed', REQUEST_TIME - $age, '<')
->range(0, 100)
Loading