From 3cd70773d81c5f9dc0a6ff1e9d25b94f654c256f Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 9 Dec 2018 23:42:40 +0100 Subject: [PATCH] Authenticator: Use id from user object Closes #519 (iCal/JSON export only works when logged in) --- src/Helpers/Authenticator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Helpers/Authenticator.php b/src/Helpers/Authenticator.php index edceaa44..61d07980 100644 --- a/src/Helpers/Authenticator.php +++ b/src/Helpers/Authenticator.php @@ -104,7 +104,7 @@ class Authenticator $abilities = (array)$abilities; if (empty($this->permissions)) { - $userId = $this->session->get('uid'); + $userId = $this->user ? $this->user->id : $this->session->get('uid'); if ($userId) { if ($user = $this->user()) {