AndyB
Well-known member
I'm creating a Member notes add-on and it uses the Member view: sidebar widget.
In my PHP code, I tried using the contextParams but it doesn't work.
How can I get the member id?
Thank you.
In my PHP code, I tried using the contextParams but it doesn't work.
PHP:
<?php
namespace Andy\MemberNotes\Widget;
use \XF\Widget\AbstractWidget;
class MemberNotes extends AbstractWidget
{
public function render()
{
// get visitor
$visitor = \XF::visitor();
// check for user group permission
if (!$visitor->hasPermission('memberNotes', 'view'))
{
return;
}
$member = $this->contextParams['member'];
...
How can I get the member id?
Thank you.