mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-25 13:08:58 +00:00
Fix issue.
This commit is contained in:
parent
e1760dd772
commit
9a4048af4b
@ -113,6 +113,10 @@ class friendsController{
|
||||
//Get target ID
|
||||
$friendID = getPostUserID('friendID');
|
||||
|
||||
//Check if the current user is requesting himself as friend
|
||||
if($friendID == userID)
|
||||
Rest_fatal_error(401, "You can not become a friend to yourself!");
|
||||
|
||||
//Check if the two persons are already friend
|
||||
if(CS::get()->components->friends->are_friend(userID, $friendID))
|
||||
Rest_fatal_error(401, "The two personns are already friend !");
|
||||
|
Loading…
Reference in New Issue
Block a user