[eluser]pieter dekker[/eluser]
Hi!
I've a problem with de erkana auth library. When you filled in the right username and password I got a 'header already sent' error. But I don't understand why that is. This is my code:
De form is pointing to validatelogin:
Code:
function validatelogin()
{
$rules['gebruikersnaam'] = "required";
$rules['wachtwoord'] = "required";
$this->validation->set_rules($rules);
$gebruikersnaam = $this->input->post('gebruikersnaam');
$wachtwoord = $this->input->post('wachtwoord');
if($this->validation->run()==False)
{
$this->load->view('login_loader');
}
else
{
$this->checklogin($gebruikersnaam, $wachtwoord);
}
}
Then if the validation is passed, you go to checklogin:
Code:
function checklogin($gebruikersnaam, $wachtwoord)
{
if($this->erkanaauth->try_login(array('gebruikersnaam' => $gebruikersnaam, 'wachtwoord' => $wachtwoord)))
{
redirect('overzicht');
}
else
{
$this->load->view('login_loader');
}
}
Then if the username and password are correct, I got a 'header already sent' error.
Can someone help me out?