How to get the id of the profile displayed by the connected user ?
If "user 1" viewing profile "user 2" I would like to retrieve the id of "user 2".
How to get the id of the profile displayed by the connected user ?
If "user 1" viewing profile "user 2" I would like to retrieve the id of "user 2".
function ownerbadges_members_action_tool( BASE_CLASS_EventCollector $event )
{
$params = $event->getParams();
$targetUserID = $params['userId'];
}
Or, if you want to find out what user a widget is currently being displayed on use this:
public function __construct( BASE_CLASS_WidgetParameter $params )
{
parent::__construct();
//Get current user profile
$targetId = $params->additionalParamList['entityId'];
}
Thank you very much for your help.
I found a solution, but it was not great.
Yours is better now. thk
I can not seem to use your method.I joined the "function" in my "public function" but my variante gives me no result?Here's how I do:
public function __construct( BASE_CLASS_WidgetParameter $paramObj )
{
parent::__construct();
function ownerbadges_members_action_tool( BASE_CLASS_EventCollector $event )
{
$params = $event->getParams();
$targetUserID= $params['userId'];
....
}
}
Can you help me?
$params->additionalParamList['entityId'];
Not $params['userId'];
Ok, thank you.
I need a communication between two different widgets.
But I'll do a search on the database to find the id of the profile with EntityID
Thank you very much for your help
Thank you, but I made uses the database and it works very well.
Thank you very much.