mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
UserSession class - Refactor addon
This commit is contained in:
parent
8eca74cfab
commit
b0eb28143a
46 changed files with 534 additions and 580 deletions
|
@ -12,7 +12,6 @@ use Friendica\Content\Pager;
|
|||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Profile;
|
||||
|
@ -44,7 +43,7 @@ function forumdirectory_app_menu(App $a, array &$b)
|
|||
|
||||
function forumdirectory_init(App $a)
|
||||
{
|
||||
if (Session::getLocalUser()) {
|
||||
if (DI::userSession()->getLocalUserId()) {
|
||||
DI::page()['aside'] .= Widget::findPeople();
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +61,7 @@ function forumdirectory_content(App $a)
|
|||
{
|
||||
global $forumdirectory_search;
|
||||
|
||||
if (DI::config()->get('system', 'block_public') && !Session::getLocalUser() && !Session::getRemoteUser()) {
|
||||
if (DI::config()->get('system', 'block_public') && !DI::userSession()->getLocalUserId() && !DI::userSession()->getRemoteUserId()) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Public access denied.'));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue