I worked on it last night, like I said. Here's what I got:
1.) Add a new field 'time' to phpbb_confirm which is INT(11). Make it an index.
2.) Remove the query in usercp_register.php that selects all the sessions. Change the DELETE FROM ' . CONFIRM_TABLE . ' query to instead go like this:
Code: Select all
'DELETE FROM phpbb_confirm WHERE time < ' . (time() - 480)
3.) Change the query which inserts a new confirm row and add the current time to it.
That will delete all confirm entries older than 8 minutes without involving the user sessions.