The code below works perfectly - except when there is pagination then instead of showing the group id of the user specified in the URL it specifys the group id of the logged-in user.
http://site.com/index.php/j2/account/24 - shows proper group id
http://site.com/index.php/j2/account/24/P25/ - shows incorrect group id
<?
$segment_3 = "{segment_3}";
if( substr($segment_3,0,1)=="C" )
{
?>
{exp:user:stats member_id="{segment_4}" }
{embed=class/includes_account_category_8 author_id="{member_id}"}
<?
}
else
{
?>
{exp:user:stats member_id="{segment_3}" }
{if group_id == "8"}
{embed=class/includes_account_8 author_id="{member_id}"}
{if:else}
{embed=class/includes_account_5 author_id="{member_id}"}
{/if}
<?
}
?>
{/exp:user:stats}
