]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagger.php
Only fetch the needed field
[friendica.git] / mod / tagger.php
index b3f5f9af196b787acdd887ffd2801b534991aa14..dae9cbc2bc76a0ad81053d0240fd4a2a34caa582 100644 (file)
@@ -22,7 +22,6 @@
 use Friendica\App;
 use Friendica\Core\Hook;
 use Friendica\Core\Logger;
-use Friendica\Core\Session;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
@@ -37,7 +36,7 @@ use Friendica\Worker\Delivery;
 
 function tagger_content(App $a)
 {
-       if (!Session::isAuthenticated()) {
+       if (!DI::userSession()->isAuthenticated()) {
                return;
        }
 
@@ -63,13 +62,13 @@ function tagger_content(App $a)
 
        $owner_uid = $item['uid'];
 
-       if (local_user() != $owner_uid) {
+       if (DI::userSession()->getLocalUserId() != $owner_uid) {
                return;
        }
 
-       $contact = Contact::selectFirst([], ['self' => true, 'uid' => local_user()]);
+       $contact = Contact::selectFirst([], ['self' => true, 'uid' => DI::userSession()->getLocalUserId()]);
        if (!DBA::isResult($contact)) {
-               Logger::warning('Self contact not found.', ['uid' => local_user()]);
+               Logger::warning('Self contact not found.', ['uid' => DI::userSession()->getLocalUserId()]);
                return;
        }