X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fapi.php;h=404ede4239ddc966dcef7db6938f38642020f2ec;hb=6501acf0bcffaa07fc3c2abe165d271985ea47b9;hp=80abb750f7d666b7f9c256d1b7da005d9b2c91f4;hpb=30dfbb95d9f764738fcaa9cf69e9c4059c38678c;p=friendica.git diff --git a/include/api.php b/include/api.php index 80abb750f7..404ede4239 100644 --- a/include/api.php +++ b/include/api.php @@ -12,6 +12,7 @@ use Friendica\Content\ContactSelector; use Friendica\Content\Feature; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\HTML; +use Friendica\App\Authentication; use Friendica\Core\Config; use Friendica\Core\Hook; use Friendica\Core\L10n; @@ -253,7 +254,9 @@ function api_login(App $a) throw new UnauthorizedException("This API requires login"); } - Session::setAuthenticatedForUser($a, $record); + /** @var Authentication $authentication */ + $authentication = BaseObject::getClass(Authentication::class); + $authentication->setForUser($a, $record); $_SESSION["allow_api"] = true;