Commit 61878fef authored by vincent baronnet's avatar vincent baronnet
Browse files

Issue #3266069 by LRoels: Cron cannot be ran through a drush command

parent 71ad125a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -450,6 +450,10 @@ function domain_entity_query_alter(AlterableInterface $query) {
 * @see domain_access_node_access
 */
function domain_entity_entity_access(EntityInterface $entity, $operation, AccountInterface $account) {
  // Return a neutral result if hook is accessed through cli.
  if (php_sapi_name() == 'cli') {
    return AccessResult::neutral();
  }

  // Ensure quick administration.
  $user = User::load($account->id());