I am using Tank Auth for user authentication. I am using the database to store sessions and using $this->auth->tank_auth->is_logged_in()
to check if user is logged in. HMVC is also used, where auth
module contains tank_auth.
Problem: It seems that some browsers cannot successfully log in into the website, including IE8, Chrome 15.0.874.121. Earlier versions of Chrome and IE are able to login. I did a trace of redirects and found out that upon logging in, the user is redirected to the main page, where the check is_logged_in()
fails and redirects the user back to the login back. Anyone knows the problem?
Config.php
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;
CI Controller Code
function index() {
$this->load->module('auth');
if(!$this->auth->tank_auth->is_logged_in()) {
redirect('login');
}
$this->load->view('main');
}