UserSession class [5] - Refactor src/Module/ files with DI

This commit is contained in:
Philipp 2022-10-20 22:59:12 +02:00
parent a729f3255d
commit eecc456e0c
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
78 changed files with 455 additions and 530 deletions

View file

@ -22,7 +22,6 @@
namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
@ -43,7 +42,7 @@ class NoScrape extends BaseModule
if (isset($this->parameters['nick'])) {
// Get infos about a specific nick (public)
$which = $this->parameters['nick'];
} elseif (Session::getLocalUser() && isset($this->parameters['profile']) && DI::args()->get(2) == 'view') {
} elseif (DI::userSession()->getLocalUserId() && isset($this->parameters['profile']) && DI::args()->get(2) == 'view') {
// view infos about a known profile (needs a login)
$which = $a->getLoggedInUserNickname();
} else {