fixed a bug which would allow visitors to be added to your friends list.

This commit is contained in:
Frank Dillon 2008-11-18 03:35:27 +00:00
parent 3bc7fdb3cb
commit 70bd363814

View file

@ -155,6 +155,7 @@ sub acceptsFriendsRequests {
return 0 unless ($user && ref $user eq "WebGUI::User"); #Sanity checks
return 0 if($self->isVisitor); #Visitors can't have friends
return 0 if($user->isVisitor); #Visitor can't be your friend either
return 0 if($self->userId eq $user->userId); #Can't be your own friend (why would you want to be?)
my $me = WebGUI::Friends->new($session,$self);