Feb 3, 2003, 11:26 PM
Veteran / Moderator (6956 posts)
Feb 3, 2003, 11:26 PM
Post #2 of 2
Views: 1088
Looking at how the login redirect works (it allows you to return a user to a template, not a URL, it seems) the best way to allow only logged in users to use the recommendit button, is to do some template stuff:
Either don't show the recommendit link to users who are not logged in, or you pop up a message that they must log in to use that feature.
<%if Username%>
you can recomend this link to a friend
<%else%>
Login to send this link to a friend!
<%end%>
You could try to add in a login, but I don't think that you'd be able to pass in the template name, and the LinkID you are trying to recommend, so it might end up confusing.
You could try:
if ($CFG->{user_required} and ! $USER) {
print $IN->redirect( Links::redirect_login_url ('recommend') );
return;
}
and see what happens.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.