Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Re: [Franco] Tags available in reply.eml

Quote Reply
Re: [Franco] Tags available in reply.eml In reply to
Hi François,

You can do this using a global. The following will provide all the user tags, prefixed with "recipient_". Eg. recipient_user_username, recipient_user_display_email, etc. After you have created the global, call it in the template:

<%global_name($parent_user_id_fk, "recipient_")%>

Code:


sub {

my ($user_id, $prefix) = @_;

$prefix ||= "";
my $user = $DB->table('User')->get($user_id) or return;
GForum::User::normalize($user);

my $return = {};


for (keys %$user) { $return->{$prefix . $_} = $user->{$_} }
$return;
}
The global sub can be used anywhere that you have a user ID.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Subject Author Views Date
Thread Tags available in reply.eml Franco 1927 Jun 12, 2002, 12:06 PM
Post Re: [Franco] Tags available in reply.eml
Jagerman 1816 Jun 13, 2002, 2:23 PM
Post Re: [Franco] Tags available in reply.eml
Franco 1805 Jun 13, 2002, 8:33 PM