• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session not working because of sess_time_to_update mechanism

#3
[eluser]InsiteFX[/eluser]
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ------------------------------------------------------------------------
* CI Session Class Extension for AJAX calls.
* ------------------------------------------------------------------------
*
* ====- Save as application/libraries/MY_Session.php -====
*/

class MY_Session extends CI_Session {

    // --------------------------------------------------------------------

    /**
     * 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() === FALSE)
        {
            parent::sess_update();
        }
    }

} // End of class MY_Session.

/* ------------------------------------------------------------------------
* Filename: MY_Session.php
* Location: ./application/libraries/MY_Session.php
* ------------------------------------------------------------------------
*/


Messages In This Thread
Session not working because of sess_time_to_update mechanism - by El Forum - 10-17-2014, 06:01 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.