Hi,
I would like to use smf's sessions in python so that people that are logged in smf are also logged in my python scripts.
In python I need to get the correct ID_MEMBER with sessions timeouts handled correctly.
Currently I fetch the session from db using cookie PHPSESSID's value, unserialize the data column and fetch the id from ban[ID_MEMBER].
But this really isn't as robust as i would need it to be.
For example when I logout from the forum, python doesn't see this change.
What is the process of doing this the right way?
Use SMF's integration hooks, and call python code from them.
So there is now way to do this just inside of mysql?
If you use database-driven sessions in SMF, you could look at the sessions table and see if the user still has a valid session, I suppose.