Blog: php

Rodrigo Aguilera's picture
Rodrigo Aguilera

How to skip node access issues during a cron process

Few days ago in Ymbra we had a challenge about how to load Drupal 7 entities during a cron job. The main issue here is that cron doesn't run with enough credentials and we need higher permissions to perform some operations.

Those entities had user access restrictions in place and when cron runs as anonymous user (even if you trigger it logged in as the user with id=1) those restrictions were respected and we weren't able to load our entity content to be later sent in an email.

So what can we do to run cron as Drupal admin?

In a...

Subscribe to RSS - php