CI認証にionauthを使用しています。登録後に自動ログインで問題が発生しました。レジスターに問題はなく、すべてのデータが挿入され、ログインフォームでログインできます。ただし、ユーザーが登録した後はホームページにリダイレクトされません。
以下は私のコードです。誰でも見てもらえますか?
if ( $this->form_validation->run() == TRUE )
{
//if form validation not false, password var
$username = $this->input->post('email');
$password = $this->input->post('password');
$email = $this->input->post('email');
$additional_data = array(
'first_name' => $this->input->post('first_name'),
'last_name' => $this->input->post('last_name'),
);
}
if ($this->form_validation->run() == TRUE && $this->ion_auth->register($username, $password, $email, $additional_data))
{
//check to see if we are creating the user
//redirect them back to the home page
$this->session->set_flashdata('msg', "User Created");
redirect("auth/home", 'refresh');
}
else
{
$this->session->set_flashdata('msg', validation_errors('<div>','</div>'));
redirect('auth/index','refresh');
}