Welcome Guest, Not a member yet? Register   Sign In
session problem
#11

[eluser]paulon[/eluser]
ok now im confused.. i used the callback function from form_validation, the same thing happen code is ok everythings working fine but still browser offering to remember a password even thought the login fails.... =(

Code:
function log_in_credential()
    {
        $this->load->library('form_validation');
        $this->form_validation->set_rules('username','Username','trim|required');
        $this->form_validation->set_rules('password','Password','trim|required|callback_checkuserpassword');
        $this->form_validation->run();                                            
        $this->index();
    }
    
    function checkuserpassword($strpass){
        $this->form_validation->set_message('checkuserpassword', "Username or Password invalid.");
        $this->db->where('username', $this->input->post('username'));
        $this->db->where('password', $strpass);
        $query = $this->db->get('members');
        
        if($query->num_rows > 0){            
            $row = $query->row();        
            $data = array(
                'username' => $this->input->post('username'),
                'member_id' => $row->member_id,
                'is_logged_in' => true,
                'login_time' => date('Y-m-d H:i:s'),
                'last_msg_recieved_lobby' =>  date('Y-m-d H:i:s'),
                'accountstatus' => $row->accountstatus                
            );
            $this->session->set_userdata($data);            
            return true;
            
        }else{                
            return false;
        }
    }


Messages In This Thread
session problem - by El Forum - 12-17-2009, 11:20 PM
session problem - by El Forum - 12-18-2009, 12:03 AM
session problem - by El Forum - 12-18-2009, 12:07 AM
session problem - by El Forum - 12-18-2009, 12:12 AM
session problem - by El Forum - 12-18-2009, 01:00 AM
session problem - by El Forum - 12-18-2009, 01:22 AM
session problem - by El Forum - 12-18-2009, 01:28 AM
session problem - by El Forum - 12-18-2009, 01:29 AM
session problem - by El Forum - 12-18-2009, 02:16 AM
session problem - by El Forum - 12-18-2009, 05:14 AM
session problem - by El Forum - 12-19-2009, 05:20 AM
session problem - by El Forum - 12-19-2009, 05:50 AM
session problem - by El Forum - 12-19-2009, 06:19 AM
session problem - by El Forum - 12-20-2009, 06:55 PM
session problem - by El Forum - 12-20-2009, 09:32 PM
session problem - by El Forum - 12-20-2009, 09:38 PM
session problem - by El Forum - 12-20-2009, 10:31 PM
session problem - by El Forum - 12-20-2009, 10:46 PM
session problem - by El Forum - 12-20-2009, 11:15 PM
session problem - by El Forum - 12-20-2009, 11:31 PM
session problem - by El Forum - 12-20-2009, 11:39 PM
session problem - by El Forum - 12-21-2009, 12:10 AM
session problem - by El Forum - 12-21-2009, 12:43 AM
session problem - by El Forum - 12-21-2009, 01:02 AM
session problem - by El Forum - 12-21-2009, 01:05 AM
session problem - by El Forum - 12-21-2009, 01:10 AM
session problem - by El Forum - 12-21-2009, 01:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB