I'm using Rules to e-mail myself the content of a Mini Panel, which contains several views that are restricted to admin-only access.
I am using a component (Action set) that consists of two actions:
- Send e-mail
- Schedule component evaluation (re-schedule the same component to be evaluated the following day)
For Send e-mail, the body of my message looks like this (based on this code):
<?php $block = module_invoke('panels_mini', 'block_view', 'admin_user_role_statistics'); print $block['content']; ?>
When I first triggered this component (using a rule that I created to trigger the component for the first time by viewing a user profile), I was logged in as an administrator, so the e-mail I received shows all of the content of the mini panel as I expected. However, the following day, when the scheduled component was evaluated, the body of the e-mail message was blank, presumably because it was not sent by an admin user.
I re-enabled the rule to trigger the component and tried it as a non-admin user: the message body was empty. I then tried it as an administrator: the message had the full content.
So, what can I do to make sure the component is evaluated as if triggered by an admin user?