我仍然是代码点火器的新手,我在登录系统工作时遇到了问题.
当我使用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; …Run Code Online (Sandbox Code Playgroud)