External call to get username/usergroups

  • Thread starter Thread starter Rushster
  • Start date Start date

Rushster

Guest
Member
I have a wordpress site and I am trying to get the username info and usergroup info to be called into a WP template. The purpose of this is to check if they are in X usergroup to hide certain bits of content.

I know that using the following in a template spits out the logged-in username which works, but it wipes all the WP content and just displays the username on the page.

<?php
$fileDir =$_SERVER["DOCUMENT_ROOT"];
require_once($fileDir . '/forums/src/XF.php');
\XF::start('/hc');
$app =...

Read more
 
Top