]> git.agnieray.net Git - galette.git/commitdiff
Fix property access on direct download links
authorJohan Cwiklinski <johan@x-tnd.be>
Sat, 5 Jun 2021 04:34:21 +0000 (06:34 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Sat, 5 Jun 2021 04:34:21 +0000 (06:34 +0200)
galette/lib/Galette/Controllers/PdfController.php
galette/lib/Galette/Core/Login.php

index 15658dd253301e833ebd5ae7f5956d9222334533..8adacd40da462944eb444a528d88a8661c0ac08b 100644 (file)
@@ -673,7 +673,7 @@ class PdfController extends AbstractController
             $this->zdb,
             $this->i18n
         );
-        $login->id = (int)$row['id_adh'];
+        $login->setId((int)$row['id_adh']);
 
         if ($target === Links::TARGET_MEMBERCARD) {
             $m = new Members();
index 1b48ceca2bcc3b8721645c7330fdce0c3e6ac3af..597bb207e255cc2b19b752634190f785c5b18320 100644 (file)
@@ -344,4 +344,17 @@ class Login extends Authentication
     {
         return $this->impersonated;
     }
+
+    /**
+     * Set id
+     *
+     * @param int $id ID to set
+     *
+     * @return $this
+     */
+    public function setId(int $id): self
+    {
+        $this->id = $id;
+        return $this;
+    }
 }