How to get current logged user user_id in Social Engine 4
As you know that Social engine used Zend framework.
In any page if you need current logged in user's user_id then you can find it via this
one piece of line code:
$currentUserID=Engine_Api::_()->user()->getViewer()->getIdentity();
echo $currentUserID;
now current logged in user's id stored in the variable $currentUserID,
you can use it in your code as you want.
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDelete