User details aren't provided with the link record, IIRC. You'll need to use a global using the link's LinkOwner column as the foreign key to the Users table, then you can return the Avatar column.
How about having a global that does this:
my $user = shift;
my $valid = $DB->table("Users")->get($user);
return { LinkOwnerAvatar => $valid->{Avatar} };
}
<%getUserAvatar($LinkOwner)%>
I use LinkOwnerAvatar in the example above to differentiate the avatar of the logged in user from that of the link owner.
Philip
------------------
Limecat is not pleased.
How about having a global that does this:
Code:
sub { my $user = shift;
my $valid = $DB->table("Users")->get($user);
return { LinkOwnerAvatar => $valid->{Avatar} };
}
<%getUserAvatar($LinkOwner)%>
I use LinkOwnerAvatar in the example above to differentiate the avatar of the logged in user from that of the link owner.
Philip
------------------
Limecat is not pleased.