diff --git a/include/api.php b/include/api.php index 4f3105b021..fd58b0d225 100644 --- a/include/api.php +++ b/include/api.php @@ -599,7 +599,10 @@ function api_statuses_mediap($type) { $a = DI::app(); - BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE); + if (empty(BaseApi::getCurrentUserID())) { + BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE); + throw new ForbiddenException(); + } $user_info = DI::twitterUser()->createFromUserId(BaseApi::getCurrentUserID())->toArray();