]> _ Git - psq.git/commitdiff
Update PdfFile.php
authorLouis Jeckel <louis.jeckel@outlook.cm>
Fri, 11 Sep 2020 14:03:17 +0000 (16:03 +0200)
committerLouis Jeckel <louis.jeckel@outlook.cm>
Fri, 11 Sep 2020 14:03:17 +0000 (16:03 +0200)
app/PdfFile.php

index 61f4fcf28722a433f086f6989d5de7f4f052cbe1..5af133eef5fcacaa8675ac2716aeb620bbd5e5f4 100644 (file)
@@ -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);