summaryrefslogtreecommitdiffstats
path: root/lib/Controller/LocalController.php
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-12-20 10:53:50 -0100
committerGitHub <noreply@github.com>2018-12-20 10:53:50 -0100
commita8fea82b230aeb620c9225222da90d3700c72913 (patch)
tree0f7c3f09b543a5f84c1b2abedbff5c28d6ede65c /lib/Controller/LocalController.php
parent4fe33de239f7c6b1c5de2651270096c18623c8c8 (diff)
parente7e4ba2d60bde58501b7a79d0da2543a674aac9e (diff)
Merge pull request #244 from nextcloud/cleanup/public-pages
Public page frontend fixes
Diffstat (limited to 'lib/Controller/LocalController.php')
-rw-r--r--lib/Controller/LocalController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php
index 6ab4994f..db8b3a02 100644
--- a/lib/Controller/LocalController.php
+++ b/lib/Controller/LocalController.php
@@ -238,6 +238,7 @@ class LocalController extends Controller {
/**
* @NoAdminRequired
* @NoSubAdminRequired
+ * @PublicPage
*
* @param string $username
* @param int $since
@@ -424,6 +425,7 @@ class LocalController extends Controller {
/**
* @NoAdminRequired
* @NoSubAdminRequired
+ * @PublicPage
*
* @param string $username
*
@@ -434,7 +436,7 @@ class LocalController extends Controller {
$this->initViewer();
$actor = $this->cacheActorService->getFromLocalAccount($username);
-
+ $actor->setCompleteDetails(true);
return $this->success(['account' => $actor]);
} catch (Exception $e) {
return $this->fail($e);
@@ -445,6 +447,7 @@ class LocalController extends Controller {
/**
* @NoAdminRequired
* @NoSubAdminRequired
+ * @PublicPage
*
* @param string $username
*
@@ -467,6 +470,7 @@ class LocalController extends Controller {
/**
* @NoAdminRequired
* @NoSubAdminRequired
+ * @PublicPage
*
* @param string $username
*
@@ -626,6 +630,9 @@ class LocalController extends Controller {
* @throws AccountDoesNotExistException
*/
private function initViewer(bool $exception = false) {
+ if (!isset($this->userId)) {
+ return;
+ }
try {
$this->viewer = $this->accountService->getActorFromUserId($this->userId, true);