Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Global help

Quote Reply
Global help
I'm trying to have a global check if a post author is in a particular group, and then assign them a particular color if they are, but it's behaving oddly. When I do just <%user_groupcheck($user_id)%> it correctly returns what I need it to, either 1 or 0. However, when I use it as I need to, within an if statement, it acts as though it's always false.

<%if user_groupcheck($user_id)%><%grouphtml%><%endif%>

The global I have is:
'user_groupcheck' => 'sub {
my $uid = shift;
my $count = $DB->table("UserGroup")->count({
group_id_fk => 18,
user_id_fk => $uid
});
return ($count and $count > 0);
}',


Realiiity.com Forums
Subject Author Views Date
Thread Global help ellipsiiis 2880 Mar 24, 2004, 12:55 PM
Thread Re: [ellipsiiis] Global help
brewt 2811 Mar 24, 2004, 1:40 PM
Post Re: [brewt] Global help
Andy 2804 Mar 25, 2004, 3:29 AM