You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session cleanup cron can delete a session that has just logged in #445
w2p_System_Session::write() inserts a new session row without session_user (L78–82), so it stays 0 until the session is written again on a later request. CUser::hook_cron() (modules/users/users.class.php L232) deletes sessions where session_user = '' OR session_user IS NULL; MySQL compares 0 = '' as true, so the cron deletes every row still at 0. If it runs between a login and the user's next request, that user is logged out.
Fix: write session_user on insert as well as on update, and clean up with an explicit session_user = 0 plus an age condition, so fresh sessions aren't removed.
Activity
Sessions: set session_user on insert; cron only removes stale anonymo…