Get rid of App->user completely
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user