/[drupal]/contributions/modules/notify/notify.module
ViewVC logotype

Diff of /contributions/modules/notify/notify.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 2.72, Sat Aug 30 14:44:49 2008 UTC revision 2.73, Wed Jan 14 01:10:53 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: notify.module,v 2.71 2008/08/30 04:02:23 matt2000 Exp $  // $Id: notify.module,v 2.72 2008/08/30 14:44:49 matt2000 Exp $
3    
4  /**  /**
5   * Implementation of hook_help().   * Implementation of hook_help().
# Line 557  function _notify_switch_user($uid = NULL Line 557  function _notify_switch_user($uid = NULL
557    static $orig_user = array();    static $orig_user = array();
558    
559    if (isset($uid)) {    if (isset($uid)) {
560        // Should a user visit cron.php, or should this module be invoked via
561        // poormanscron and _notify_send() does not complete,
562        // the visitor will end up logged in as the "switched to user" for
563        // subsequent requests unless we disable saving the session
564        // until we are sure we're the invoking user again.
565        session_save_session(FALSE);
566      $user = user_load(array('uid' => $uid));      $user = user_load(array('uid' => $uid));
567    }    }
568    // Retrieve the initial user, can be called multiple times.    // Retrieve the initial user, can be called multiple times.
569    else if (count($orig_user)) {    else if (count($orig_user)) {
570      $user = array_shift($orig_user);      $user = array_shift($orig_user);
571      array_unshift($orig_user, $user);      array_unshift($orig_user, $user);
572        session_save_session(TRUE);
573    }    }
574    // Store the initial user.    // Store the initial user.
575    else {    else {

Legend:
Removed from v.2.72  
changed lines
  Added in v.2.73

  ViewVC Help
Powered by ViewVC 1.1.2