From 0b56ff0aa0a31a47eacf7a7691265f99736825be Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sat, 28 Dec 2019 15:18:18 +0100 Subject: [PATCH] Add DI::auth() call to windowsphonepush --- windowsphonepush/windowsphonepush.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php index 242fe96d..8d35e787 100644 --- a/windowsphonepush/windowsphonepush.php +++ b/windowsphonepush/windowsphonepush.php @@ -27,16 +27,14 @@ */ use Friendica\App; -use Friendica\BaseObject; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\HTML; -use Friendica\App\Authentication; use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Core\PConfig; -use Friendica\Core\Session; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Model\Item; use Friendica\Model\User; @@ -475,9 +473,7 @@ function windowsphonepush_login(App $a) die('This api requires login'); } - /** @var Authentication $authentication */ - $authentication = BaseObject::getClass(Authentication::class); - $authentication->setForUser($a, $record); - $_SESSION["allow_api"] = true; + DI::auth()->setForUser($a, $record); + DI::session()->set('allow_api', true); Hook::callAll('logged_in', $a->user); } -- 2.39.5