From 1fa009888108966d6ac48c5eac41bfef40d360a4 Mon Sep 17 00:00:00 2001 From: Louis Jeckel Date: Fri, 11 Sep 2020 16:03:17 +0200 Subject: [PATCH] Update PdfFile.php --- app/PdfFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/PdfFile.php b/app/PdfFile.php index 61f4fcf..5af133e 100644 --- a/app/PdfFile.php +++ b/app/PdfFile.php @@ -375,7 +375,7 @@ class PdfFile extends TwillModel implements Sortable */ public function getMailableUrl(User $user): string { - return ($user->type === User::TYPE_DISCOVER) ? + return ($user->type === User::TYPE_DISCOVER && !$user->self_registered) ? $this->getSignedUrl($user) : $this->getUrlWithToken($user); -- 2.39.5