Access Logged In user Information on Server side.
-
Hi,
How can I get 'Current Logged In user' information such as 'uid', 'username' into my plugins hook. For Eg. I need currently logged in user information into "filter:controllers.topic.get" hook.
If it is not available then how I can initiate communication from 'SERVER' side to 'CLIENT' side,
So that I can get logged in user information to 'SERVER' side.Thanks!!
-
-
I'm not sure if you can get the hook on the client side. You could listen for ajaxify events maybe, detect if a post is being loaded, and modify that maybe.
-
You are telling me uid of "Post creater" . In the above filter is gives me uid of that post.
I need CURRENTLY LOGIN uid into my hook "filter:controllers.topic.get" .
If anyone knows that, how to get CURRENTLY LOGIN uid at SERVER side then please let me know.
-
@akumbhare the uid field of the object passed into the callback of the server side
filter:topic.get
hook is the uid of the user requesting the page, not the uid of the person who wrote the post.