- if ($a->argc > 1) {
- DFRN::autoRedir($a, $a->argv[1]);
- }
-
- if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
- System::httpExit(403, ['title' => L10n::t('Access denied.')]);
+ if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
+ throw new \Friendica\Network\HTTPException\ForbiddenException(L10n::t('Access denied.'));