[eluser]megabyte[/eluser]
I also don't understand how there can be arguments in a public function inside a controller?
When I say I don't understand, I don't mean I'm questioning you. I mean I didn't know you can do this, or how they would be used.
Code:
//activate the user
function activate($id, $code=false)
{
$activation = $this->ion_auth->activate($id, $code);
if ($activation) {
//redirect them to the auth page
$this->session->set_flashdata('message', $this->ion_auth->messages());
redirect("auth", 'refresh');
}
else {
//redirect them to the forgot password page
$this->session->set_flashdata('message', $this->ion_auth->errors());
redirect("auth/forgot_password", 'refresh');
}
}