UserSession class [2] - Refactor mod/ files
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user