Index: poormanscron.module =================================================================== --- poormanscron.module (revision 90) +++ poormanscron.module (working copy) @@ -56,6 +56,12 @@ * @see poormanscron_run_cron_check_access() */ function poormanscron_run_cron_check() { + // Close session so any session data generated by cron doesn't affect the current user who triggered this cron + session_write_close(); + $_SESSION = array(); + // Reset the current user to anonymous. Since session is closed we won't worry about changing the global user variable. + $GLOBALS['user'] = drupal_anonymous_user(); + $time = time(); $cron_run = FALSE; $cron_threshold = variable_get('cron_safe_threshold', 10800);