Quote:
Originally Posted by mohammad6006
Does this hook work when a member login with cookie or session and without login form?
|
I'm not sure if it does or not, but it would be easy to test. But there's another possibility in case that doesn't work for you: there's a variable $vbulletin->session->created which is only true for a request that creates a session, so you could use code like this:
Code:
if ($vbulletin->session->created)
{
// do your logging here
}
Note that a session is created for a guest, so if you don't want to log every time a new guest arrives, you'll want to check for $vbulletin->userinfo['userid'] != 0 before logging. And yes, if a guest (who will already have a session) logs in, a new session is created (I tested that).
Oh, and that probably works for any hook, although you might want to use global_complete since then whatever you do will happen after the page has been sent.