Get rid of App->user completely
This commit is contained in:
parent
fc283ab928
commit
28090bd793
39 changed files with 158 additions and 234 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue