From: Jonny Tischbein Date: Sat, 15 Sep 2018 09:06:55 +0000 (+0200) Subject: api_friendships_detroy uid - api_user instead of local_uer, empty check for X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a0942963c9f3881c61c05b4c6b9943f6ebf4d686;p=friendica.git api_friendships_detroy uid - api_user instead of local_uer, empty check for --- diff --git a/include/api.php b/include/api.php index 49aa4489b0..242f4bc3bb 100644 --- a/include/api.php +++ b/include/api.php @@ -3640,17 +3640,15 @@ api_register_func('api/direct_messages/destroy', 'api_direct_messages_destroy', */ function api_friendships_destroy($type) { - $a = api_user(); + $uid = api_user(); - if ($a === false) { + if ($uid === false) { throw new ForbiddenException(); } - $uid = local_user(); - $contact_id = defaults($_REQUEST, 'user_id'); - if ($contact_id == null) { + if (empty($contact_id)) { logger("No user_id specified", LOGGER_DEBUG); throw new BadRequestException("no user_id specified"); }