rewritten: sessions management
(Session, SessionContainer, SessionManager) now a Session object don't copy all fields in its copy constructor (only id) the rest fields are set after the object is inserted in SessionContainer added: after successfully login a session id is changed added: plugin.Call() methods with a first argument a pointer to a Session object git-svn-id: svn://ttmath.org/publicrep/winix/trunk@823 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -231,6 +231,10 @@ bool Users::LoginUser(long user_id, bool remember_me, bool use_ses_log)
|
||||
cur->session->spam_score = 0;
|
||||
cur->session->remember_me = remember_me;
|
||||
|
||||
// change session id before last.UserLogin()
|
||||
if( !cur->session->new_session )
|
||||
session_manager->ChangeSessionId(cur->session->id);
|
||||
|
||||
last.UserLogin(user_id, cur->session->puser->name, inet_addr(cur->request->env_remote_addr), cur->session->id);
|
||||
how_many_logged += 1;
|
||||
|
||||
|
Reference in New Issue
Block a user