Jump to content

Get current user ID inside forums block

Ivo Pereira

Recommended Posts

I was able to achieve it. I was using the wrong code block. Needed to activate the "Active PHP widget" in plugin settings, then get the "PHP Code" block (that appeared after activating the setting) and get it to layout.

After that, this did it:

$logged_in = \IPS\Member::loggedIn();

if (!empty($logged_in)) {
    echo '<iframe src="http://example.com/' . $logged_in->member_id . '" width="100%" height="400" frameborder="0"></iframe>';


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...