mirror of
https://github.com/friendica/friendica
synced 2025-04-20 13:50:16 +00:00
New function "isAuthenticated"
This commit is contained in:
parent
89f02a1125
commit
83b00ef308
26 changed files with 64 additions and 48 deletions
|
@ -8,6 +8,7 @@ use Friendica\Content\Pager;
|
|||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
|
@ -25,8 +26,8 @@ class Directory extends BaseModule
|
|||
$app = self::getApp();
|
||||
$config = $app->getConfig();
|
||||
|
||||
if (($config->get('system', 'block_public') && !local_user() && !remote_user()) ||
|
||||
($config->get('system', 'block_local_dir') && !local_user() && !remote_user())) {
|
||||
if (($config->get('system', 'block_public') && !Session::isAuthenticated()) ||
|
||||
($config->get('system', 'block_local_dir') && !Session::isAuthenticated())) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Public access denied.'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue