Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<%Links::Utils::load_user%>

Quote Reply
<%Links::Utils::load_user%>
 
Hi,

I use <%Links::Utils::load_user%> to get the details of the editor of a particular link (name, image, etc.)- sadly it also makes Links belive a user is logged in (ie the user who own the link) and hence any call for ex. $Username will suddenly refer to the user who posted the link and not the current user logged in.

Any ideas? can I ex. "unload" after getting the editor details or get the info in a different way?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] <%Links::Utils::load_user%> In reply to
Hi,

I'm working on an aswer for you in another post. The reason you can't use this utility, is that it does exactly what you say, as it was designed to -- load the current user, or set up a user as current. Wait for a later post, just wanted to comment here though.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [klauslovgreen] <%Links::Utils::load_user%> In reply to
Get the info like this:

Code:
sub {
my $tags = $DB->table('Editors','Links')->select({ Username => $_[0] })->fetchrow_hashref;
my $pref = {};
%$pref = map { +"tmp_$_" => $tags->{$_} } keys %$tags;
return $pref
}

...then pass in the username to the global.

You can then use any of the tags - they are prefixed with tmp_ to avoid clashes.

Last edited by:

Paul: Mar 1, 2003, 12:44 PM
Post deleted by klauslovgreen In reply to

Last edited by:

klauslovgreen: Mar 1, 2003, 9:02 PM
Quote Reply
Re: [Paul] <%Links::Utils::load_user%> In reply to
Thanks Paul - perfect!

Klaus

http://www.ameinfo.com