I am trying to use the code below to check to see if the visitor is a member of a certain member group. If the user is, I want some HTML to be echo'ed out. For some reason, it seems as though the condition below fails. I am a member of the member group that is being checked for so that can't be it. Anyway, here is the basic code that I am trying to get to work.
if(in_array(20, $user_info['groups']))
{
echo '[...]';
}
Anyone have any suggestions that might resolve this issue? Thanks in advance.
*edit* by the way, I am using SMF 1.1 RC2.
make sure $user_info is in the list of global variables. So at the beginning of the function you should see something like:
global $context, $txt, $settings;
If $user_info isn't in that list just add it in.
Thanks. That did it. :)