Visman 4 anni fa
parent
commit
343fbd5d67
1 ha cambiato i file con 3 aggiunte e 9 eliminazioni
  1. 3 9
      app/Models/Pages/Email.php

+ 3 - 9
app/Models/Pages/Email.php

@@ -28,7 +28,7 @@ class Email extends Page
      */
     public function email(array $args, string $method): Page
     {
-        $this->curUser = $this->c->users->load((int) $args['id']);
+        $this->curUser = $this->c->users->load($args['id']);
 
         if (
             ! $this->curUser instanceof User
@@ -134,15 +134,9 @@ class Email extends Page
     protected function formEmail(array $args, array $data): array
     {
         return [
-            'action' => $this->c->Router->link(
-                'SendEmail',
-                $args
-            ),
+            'action' => $this->c->Router->link('SendEmail', $args),
             'hidden' => [
-                'token' => $this->c->Csrf->create(
-                    'SendEmail',
-                    $args
-                ),
+                'token'    => $this->c->Csrf->create('SendEmail', $args),
                 'redirect' => $data['redirect'] ?? '',
             ],
             'sets'   => [