- if (local_user()) {
- $app->page['aside'] .= Widget::findPeople();
- $app->page['aside'] .= Widget::follow();
- } else {
- unset($_SESSION['theme']);
- unset($_SESSION['mobile-theme']);
- }
- }
-
- public static function post()
- {
- if (!empty($_POST['search'])) {
- self::getApp()->data['search'] = $_POST['search'];
+ if (($config->get('system', 'block_public') && !Session::isAuthenticated()) ||
+ ($config->get('system', 'block_local_dir') && !Session::isAuthenticated())) {
+ throw new HTTPException\ForbiddenException(DI::l10n()->t('Public access denied.'));