mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:42:53 +00:00
Merge pull request #14161 from annando/error
Fix " Call to undefined method Friendica\App::getLoggedInUserNickname"
This commit is contained in:
commit
cad3a01b1c
1 changed files with 2 additions and 6 deletions
|
@ -22,14 +22,11 @@
|
|||
namespace Friendica\Module\Calendar\Event;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\Event;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
@ -46,17 +43,16 @@ class Get extends \Friendica\BaseModule
|
|||
/** @var IHandleUserSessions */
|
||||
protected $session;
|
||||
|
||||
public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = [])
|
||||
public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->session = $session;
|
||||
$this->app = $app;
|
||||
}
|
||||
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
$nickname = $this->parameters['nickname'] ?? $this->app->getLoggedInUserNickname();
|
||||
$nickname = $this->parameters['nickname'] ?? $this->session->getLocalUserNickname();
|
||||
if (!$nickname) {
|
||||
throw new HTTPException\UnauthorizedException();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue