06-27-2007, 04:22 AM
[eluser]xeron[/eluser]
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 [email protected]
> user gets inactive
> user is active again, but now logged in as [email protected]
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
login validation on every page:
admin area:
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!
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 [email protected]
> user gets inactive
> user is active again, but now logged in as [email protected]
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
Code:
$config['sess_expiration'] = 7200;
login validation on every page:
Code:
if (!$this->userauth->check('',TRUE) || !$this->userauth->loggedin()) redirect('users/login');
admin area:
Code:
$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!