Example #1
0
 function sess_update()
 {
     // Do NOT update an existing session on AJAX calls.
     if (!$this->CI->input->is_ajax_request()) {
         return parent::sess_update();
     }
 }
Example #2
0
 /**
  * sess_update()
  *
  * Do not update an existing session on ajax or xajax calls
  *
  * @access    public
  * @return    void
  */
 public function sess_update()
 {
     $CI =& get_instance();
     if (!$CI->input->is_ajax_request()) {
         parent::sess_update();
     }
 }
 /**
  * Update an existing session
  *
  * Updates an existing Code Igniter session.
  *
  * @access	public
  * @param	none
  * @return	none
  */
 function sess_update()
 {
     if (!$this->CI->input->is_ajax_request()) {
         $CI =& get_instance();
         $this->db = $CI->load->database('default', TRUE);
         $old_session_id = $this->userdata('session_id');
         $user_id = FALSE;
         // Get user ID if logged in
         if ($this->is_authenticated()) {
             $user_id = $this->get_user_id();
         }
         parent::sess_update();
         // Updated associated session ID in the user's database entry but only if the user has not logged in elsewhere
         if ($user_id && $old_session_id == $this->userinfo->session_id) {
             $user_table = '';
             $user_field = '';
             switch ($this->get_usertype()) {
                 case USER_TYPE_FRONT:
                     $this->db->update('student', array('session_id' => $this->get_session_id()), array('moodle_id' => $user_id));
                     break;
                 case USER_TYPE_ADMIN:
                     $this->db->update('administrator', array('session_id' => $this->get_session_id()), array('admin_id' => $user_id));
                     break;
                 default:
             }
             // Update session ID for this request
             $this->userinfo->session_id = $this->get_session_id();
         }
     }
 }
Example #4
0
 /**
  * Update an existing session
  *
  * @access    public
  * @return    void
  */
 function sess_update()
 {
     // skip the session update if this is an AJAX call!
     if (!IS_AJAX) {
         parent::sess_update();
     }
 }
Example #5
0
 function sess_update()
 {
     //Listen to HTTP_X_REQUESTED_WITH
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] !== 'XMLHttpRequest') {
         parent::sess_update();
     }
 }
 function sess_update()
 {
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') {
         // This is not an ajax call
         parent::sess_update();
     }
 }
Example #7
0
 /**
  * Update an existing session
  *
  * @access    public
  * @return    void
  */
 function sess_update()
 {
     // Skip session update if this is an AJAX call. This is a bug in CI, see https://github.com/bcit-ci/CodeIgniter/issues/154
     if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') {
         parent::sess_update();
     }
 }
Example #8
0
 public function sess_update()
 {
     if ($this->sess_time_to_update == 0) {
         return;
     }
     parent::sess_update();
 }
Example #9
0
 function sess_update()
 {
     /* Listen to HTTP_X_REQUESTED_WITH */
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] !== 'XMLHttpRequest') {
         /* This is NOT an ajax call */
         parent::sess_update();
     }
 }
Example #10
0
 function sess_update()
 {
     if ($this->is_custom_session) {
         return $this->session_driver->sess_update();
     } else {
         return parent::sess_update();
     }
 }
Example #11
0
 function sess_update()
 {
     // We return right away meaning we never update our sessions.
     return true;
     // skip the session update if this is an AJAX call!
     if (!IS_AJAX && !IS_FLASH) {
         parent::sess_update();
     }
 }
Example #12
0
 /**
  * Update an existing session
  *
  * @access    public
  * @return    void
  */
 function sess_update()
 {
     // skip the session update if this is an AJAX call! This is a bug in CI; see:
     // https://github.com/EllisLab/CodeIgniter/issues/154
     // http://codeigniter.com/forums/viewthread/102456/P15
     if (!$this->CI->input->is_ajax_request()) {
         parent::sess_update();
     }
 }
 /**
  * Update session when not ajax request
  */
 public function sess_update()
 {
     /*
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest')
     {
         // This is not an Ajax call
         parent::sess_update();
     }
     */
     $CI =& get_instance();
     if (!$CI->input->is_ajax_request()) {
         parent::sess_update();
     }
 }
Example #14
0
 function sess_update()
 {
     if (!isAjax()) {
         parent::sess_update();
     }
 }
Example #15
0
 public function sess_update()
 {
     if (!$this->CI->input->is_ajax_request()) {
         parent::sess_update();
     }
 }