mirror of
				https://github.com/pierre42100/ComunicAPI
				synced 2025-10-31 02:04:53 +00:00 
			
		
		
		
	Fix issue.
This commit is contained in:
		| @@ -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 !"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Pierre HUBERT
					Pierre HUBERT