Get rid of App->user completely

This commit is contained in:
Michael 2021-08-08 19:30:21 +00:00
commit 28090bd793
39 changed files with 158 additions and 234 deletions

View file

@ -26,12 +26,7 @@ require_once __DIR__ . '/../include/api.php';
function api_post(App $a)
{
if (!local_user()) {
notice(DI::l10n()->t('Permission denied.'));
return;
}
if (empty($a->getUserId()) || $a->getUserId() != local_user()) {
if (!$a->isLoggedIn()) {
notice(DI::l10n()->t('Permission denied.'));
return;
}