1
This'll probably be a strange question, but here goes...
I would like to know the absolute shortest path to knowing the uid of the the currently signed on XOOPS User. I am
not looking for something like this:
require_once("mainfile.php");
echo $_SESSION['xoopsUserId']);
Yes, that's very short (in that it is only 2 lines of code), but is it really? Loading in mainfile.php causes lots of XOOPS plumbing to load in the background. That is not desirable (in my case), so I, instead, would like to do the following:
1) Attach to the database.
2) Read in the session information.
3) Determine who the currently logged in user is based on that session information.
I've been trying to piece this together for the past few minutes myself but keep including more and more 'stuff' in that ends up not being any different than just including mainfile.php in the first place (which, again, isn't desirable for me).
Even if I had to hard code some value in (db type, root name, root password, etc.), I wouldn't mind...just as long as I could get the session's uid without having to have the entire XOOPS API loaded to do so.
Hopefully, at least one of you out there will find this interesting enough to help me out!
Thanks!