Internet Explorer中的代码点火器登录,会话和重定向问题?

Joh*_*ohn 6 session redirect codeigniter

我仍然是代码点火器的新手,我在登录系统工作时遇到了问题.

当我使用Firefox时,登录始终有效.登录始终适用于某些IE7浏览器,但在其他IE7浏览器上始终失败.

在跟踪代码时,我看到models/redux_auth_model.php确实成功验证了用户,它将用户信息写入$ this-> session-> set_userdata(),并将它们重定向到我选择的成员页面.这是代码:

public function login($identity = false, $password = false)
{
            $identity_column = $this->config->item('identity');
            $users_table     = $this->tables['users'];

            if ($identity === false || $password === false || $this->identity_check($identity) == false)
            {
                return false;
            }

            $query = $this->db->select($identity_column.', email, password, group_id')
                           ->where($identity_column, $identity)
                           ->where('active', 'Active')
                           ->limit(1)
                           ->get($users_table);

        $result = $query->row();

        if ($query->num_rows() == 1)
        {
            //$password = $this->hash_password_db($identity, $password);

           if (!empty($result->activation_code)) { return false; }

                if ($result->password === $password)
                {
                    $this->session->set_userdata($identity_column,  $result->{$identity_column});
                    $this->session->set_userdata('email',  $result->email);
                    $this->session->set_userdata('group',  $result->group_id);
                    return true;
                }
        }

        return false;
}
Run Code Online (Sandbox Code Playgroud)

我在IE7和FF中都进行了$ this-> session的变量转储,并确认在重定向之前所有的userdata都是完整的.会话有我的电子邮件信息,组信息和$ identity_column信息.

但是,在重定向之后,某些IE7浏览器上的会话数据为空,这就是CI继续将我引导出系统的原因.它在其他IE7浏览器上完好无损,并且在Firefox中始终完好无损.

为什么会话数据会依赖于浏览器?

有关如何进一步排除故障的任何想法?我很困惑......

ekh*_*led 7

Codeigniter数据库会话类是一个令人沮丧的问题,最后我使用本地会话使用本地会话:https://github.com/EllisLab/CodeIgniter/wiki/Native-session


Jam*_*mal 6

我在IE中使用CI Session时遇到了同样的问题.然后我在控制器构造函数中使用下面的标题,它适用于我.

这是标题:

header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');