I am still new to code igniter and I am having problems with the login system.
Logging in always works when I use Firefox. Logging in sequentially works in some IE7 browsers, but subsequently crashes in other IE7 browsers.
When tracking the code, I see that the / redux _auth_model.php models successfully authenticate the user, he writes the user information to $ this-> session-> set_userdata () and redirects them to the participant’s page of my choice, Here is the code:
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; }
I made a session dump variable $ this-> in IE7 and FF and confirmed that all user data remains untouched until redirected. My email details, group information, and team identifier information were indicated at the session.
However, after redirecting, the session data is empty in some IE7 browsers, so CI continues to unload me from the system. It is completely intact in other IE7 browsers and always intact in Firefox.
Why is session data browser dependent?
Any ideas on how to fix this problem further? I am puzzled ...
redirect codeigniter session
John
source share