Are you sure that hook's only called when a session has expired? It seems like a session object would have to be created every page load. But you could be right, I haven't studied it closely. Anyway, if it's true then one thing you could do is have a plugin using hook fetch_session_complete that just sets a global variable to true, then in global_setup_complete check that variable and only do the rest if it's true. I think that achieves the same thing except that $vbulletin will be completely set up when your code runs.
|