mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:50: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
|
@ -22,7 +22,6 @@
|
|||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
|
||||
|
@ -34,7 +33,7 @@ class FollowConfirm extends BaseModule
|
|||
protected function post(array $request = [])
|
||||
{
|
||||
parent::post($request);
|
||||
$uid = Session::getLocalUser();
|
||||
$uid = DI::userSession()->getLocalUserId();
|
||||
if (!$uid) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
|
@ -44,7 +43,7 @@ class FollowConfirm extends BaseModule
|
|||
$duplex = intval($_POST['duplex'] ?? 0);
|
||||
$hidden = intval($_POST['hidden'] ?? 0);
|
||||
|
||||
$intro = DI::intro()->selectOneById($intro_id, Session::getLocalUser());
|
||||
$intro = DI::intro()->selectOneById($intro_id, DI::userSession()->getLocalUserId());
|
||||
|
||||
Contact\Introduction::confirm($intro, $duplex, $hidden);
|
||||
DI::intro()->delete($intro);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue