UserSession class [2] - Refactor mod/ files

This commit is contained in:
Philipp
2022-10-20 21:02:49 +02:00
parent a729f3255d
commit bfe68702db
25 changed files with 201 additions and 201 deletions

View File

@@ -37,7 +37,7 @@ use Friendica\Worker\Delivery;
function tagger_content(App $a)
{
if (!Session::isAuthenticated()) {
if (!DI::userSession()->isAuthenticated()) {
return;
}
@@ -63,13 +63,13 @@ function tagger_content(App $a)
$owner_uid = $item['uid'];
if (Session::getLocalUser() != $owner_uid) {
if (DI::userSession()->getLocalUserId() != $owner_uid) {
return;
}
$contact = Contact::selectFirst([], ['self' => true, 'uid' => Session::getLocalUser()]);
$contact = Contact::selectFirst([], ['self' => true, 'uid' => DI::userSession()->getLocalUserId()]);
if (!DBA::isResult($contact)) {
Logger::warning('Self contact not found.', ['uid' => Session::getLocalUser()]);
Logger::warning('Self contact not found.', ['uid' => DI::userSession()->getLocalUserId()]);
return;
}