fixed a bug which would allow visitors to be added to your friends list.
This commit is contained in:
parent
3bc7fdb3cb
commit
70bd363814
1 changed files with 1 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue