Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Recommend_it limit to registred users

Quote Reply
Recommend_it limit to registred users
Title says it all - how can I limit Recommed_It plugin to only registered users..

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Recommend_it limit to registred users In reply to
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.