Welcome Guest, Not a member yet? Register   Sign In
EzAuth 0.6 - The Easiest User Management System for CI
#32

[eluser]JulianM[/eluser]
Hi mdriscol,

I made exactly the same as Brant explains in his post.

For your convenience, I just put this code in MY_Session.php file under libraries.

Code:
<?php
if (! defined('BASEPATH'))
    exit('No direct script access allowed');
/**
* PHP Template.
*
* http://www.avnetlabs.com/php/two-step-view-with-codeigniter
*/

class MY_Session extends CI_Session
{

    function MY_Validation ()
    {
        parent::CI_Session();
    }

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


    /**
     * Serialize an array
     *
     * This is a copy of the original from 1.7.0
     * This is a bug fix for handling objects in a session
     * REF: http://ellislab.com/forums/viewthread/95690/
     *
     * This function first converts any slashes found in the array to a temporary
     * marker, so when it gets unserialized the slashes will be preserved
     *
     * @access  private
     * @param   array
     * @return  string
     */
    function _serialize ($data)
    {
        if (is_array($data))
        {
            foreach ($data as $key => $val)
            {
                if (! is_object($val))
                    $data[$key] = str_replace('\\', '{{slash}}', $val);
            }
        } else
        {
            $data = str_replace('\\', '{{slash}}', $data);
        }
        
        return serialize($data);
    }

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


    /**
     * Unserialize
     *
     * This function unserializes a data string, then converts any
     * temporary slash markers back to actual slashes
     *
     * @access    private
     * @param    array
     * @return    string
     */
    function _unserialize ($data)
    {
        $data = @unserialize(strip_slashes($data));
        
        if (is_array($data))
        {
            foreach ($data as $key => $val)
            {
                if (! is_object($val))
                    $data[$key] = str_replace('{{slash}}', '\\', $val);
            }
            
            return $data;
        }
        
        return str_replace('{{slash}}', '\\', $data);
    }
}

?>





[quote author="mdriscol" date="1230605086"]I tried the extend library class described in the linked post. I even edited the Session class directly and changed the affected lines but it still didn't fix it. I still get the same error when trying to log into ez_auth. How did you get it to work??[/quote]


Messages In This Thread
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 01-31-2008, 12:40 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-01-2008, 07:45 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-01-2008, 08:17 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-01-2008, 09:36 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-01-2008, 12:48 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-01-2008, 01:06 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-01-2008, 01:47 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-12-2008, 09:49 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-12-2008, 11:00 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-12-2008, 11:11 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-22-2008, 01:04 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-22-2008, 01:08 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-22-2008, 09:12 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 03-22-2008, 03:43 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 04-23-2008, 11:40 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 06-23-2008, 11:06 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 06-24-2008, 01:07 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 06-29-2008, 05:59 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 07-05-2008, 03:08 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 07-29-2008, 04:32 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 07-31-2008, 12:25 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 07-31-2008, 12:29 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 10-30-2008, 12:31 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 11-01-2008, 06:21 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 11-01-2008, 10:18 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 11-03-2008, 05:51 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 12-11-2008, 04:32 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 12-27-2008, 02:53 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 12-29-2008, 01:48 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 12-29-2008, 01:59 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 12-29-2008, 02:44 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 12-29-2008, 03:05 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-22-2009, 05:50 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-25-2009, 06:58 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-25-2009, 07:06 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-25-2009, 07:51 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-25-2009, 08:06 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-26-2009, 01:52 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 02-26-2009, 09:56 AM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 09-19-2009, 01:52 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 01-11-2010, 02:49 PM
EzAuth 0.6 - The Easiest User Management System for CI - by El Forum - 06-16-2010, 12:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB