hi
i’m getting crazy with this session library:
http://codeigniter.com/wiki/Native_session/
it is working, but sometimes when a user is inactive for some minutes and he refreshes the page, he appears to be logged in as another user.
i’m using email addresses as usernames, and when this problem occurs the new username is truncated near the end
i’ll try to explain it better:
> user logged in as .(JavaScript must be enabled to view this email address)
> user gets inactive
> user is active again, but now logged in as someoneelse@mail
here is my session library: CLICK
first i was using CI 1.5.1 with UserAuth from this thread: http://ellislab.com/forums/viewthread/45880/
after the problem occured i tried to use native_session from the wiki
i renamed CI_Session to CI_Native_session, to stay compatible with the rest of the code, because i use native_session->flashdata a lot
config.php
$config['sess_expiration'] = 7200;
login validation on every page:
if (!$this->userauth->check('',TRUE) || !$this->userauth->loggedin()) redirect('users/login');
admin area:
$this->userauth->set_allow('@admin');
if (!$this->userauth->check('', TRUE)) {
redirect();
}
i’ve just had users who were logged in as admin after this bug occured, and i don’t know where the problem could be :(
please, help me!
