diff --git a/modules/communication/communication.controller.php b/modules/communication/communication.controller.php index caa411a2d..b09bd1d3b 100644 --- a/modules/communication/communication.controller.php +++ b/modules/communication/communication.controller.php @@ -463,6 +463,16 @@ class communicationController extends communication { return new Object(-1, 'msg_invalid_request'); } + + // Check duplicate friend + $args = new stdClass(); + $args->member_srl = $logged_info->member_srl; + $args->target_srl = $target_srl; + $output = executeQuery('communication.isAddedFriend', $args); + if($output->data->count) + { + return new Object(-1, 'msg_already_friend'); + } // Variable $args = new stdClass();