mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
UserSession class [5] - Refactor src/Module/ files with DI
This commit is contained in:
parent
a729f3255d
commit
eecc456e0c
78 changed files with 455 additions and 530 deletions
|
@ -24,7 +24,6 @@ namespace Friendica\Module;
|
|||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Notification;
|
||||
|
@ -39,11 +38,11 @@ class Delegation extends BaseModule
|
|||
{
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
if (!Session::getLocalUser()) {
|
||||
if (!DI::userSession()->getLocalUserId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$uid = Session::getLocalUser();
|
||||
$uid = DI::userSession()->getLocalUserId();
|
||||
$orig_record = User::getById(DI::app()->getLoggedInUserId());
|
||||
|
||||
if (DI::session()->get('submanage')) {
|
||||
|
@ -115,11 +114,11 @@ class Delegation extends BaseModule
|
|||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
if (!Session::getLocalUser()) {
|
||||
if (!DI::userSession()->getLocalUserId()) {
|
||||
throw new ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$identities = User::identities(DI::session()->get('submanage', Session::getLocalUser()));
|
||||
$identities = User::identities(DI::session()->get('submanage', DI::userSession()->getLocalUserId()));
|
||||
|
||||
//getting additinal information for each identity
|
||||
foreach ($identities as $key => $identity) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue