accion mutante
Member
Posted 11 months ago #
Hi,
I want to get the current user id from within an applet, don't want to pass it as an applet param for some security reason.
I don't uderstand how wordpress retrieve the current user, it must be a session id somewhere in the database right?
Does anyone get an idea?
accion mutante
Member
Posted 11 months ago #
Hi,
thank you but neither get_currentuserinfo() or wp_get_current_user() can work (I still tested these both methods).
The reason, I think, is that the applet can not recognize the session so that I get always an ID == 0.
I wonder how wordpress can return a current user with the above methods, I looked at the code but I don't get it.
Does it use cookies? session id in database?
Probably cookies, but you'll have to dig into the source code.