Hi! I’m trying to grant access to content based on a user’s member group using php. Is there a better way to access it in php than {member_group}? I’ve been able to pull out custom field data in php, but the {member_group} variable gives me problems. If I do this:
<?php
$memberGroup = "{member_group}";
echo $memberGroup;
?>I get the member group out in a string form. Its funny though because the string length is 14 characters and $memberGroup[0]=”{" and $memberGroup[1]="m" and $memberGroup[2]="e" and so until you get {member_group}. If you actually display all $memberGroup[0] to $memberGroup[13] in a row you get out the member group in string form again. It seems what EE is doing with it is a postprocessor replace on the string {member_group}. I just want the integer value. Is there an easy way to get an integer?
Thanks!