mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
Fix issue.
This commit is contained in:
parent
e1760dd772
commit
9a4048af4b
@ -113,6 +113,10 @@ class friendsController{
|
|||||||
//Get target ID
|
//Get target ID
|
||||||
$friendID = getPostUserID('friendID');
|
$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
|
//Check if the two persons are already friend
|
||||||
if(CS::get()->components->friends->are_friend(userID, $friendID))
|
if(CS::get()->components->friends->are_friend(userID, $friendID))
|
||||||
Rest_fatal_error(401, "The two personns are already friend !");
|
Rest_fatal_error(401, "The two personns are already friend !");
|
||||||
|
Loading…
Reference in New Issue
Block a user