forked from friendica/friendica-addons
Add DI::auth() call to windowsphonepush
This commit is contained in:
parent
9d9384f5ed
commit
0b56ff0aa0
|
@ -27,16 +27,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\BaseObject;
|
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\App\Authentication;
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Session;
|
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
use Friendica\DI;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
|
|
||||||
|
@ -475,9 +473,7 @@ function windowsphonepush_login(App $a)
|
||||||
die('This api requires login');
|
die('This api requires login');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var Authentication $authentication */
|
DI::auth()->setForUser($a, $record);
|
||||||
$authentication = BaseObject::getClass(Authentication::class);
|
DI::session()->set('allow_api', true);
|
||||||
$authentication->setForUser($a, $record);
|
|
||||||
$_SESSION["allow_api"] = true;
|
|
||||||
Hook::callAll('logged_in', $a->user);
|
Hook::callAll('logged_in', $a->user);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue