src/Form/Data/System/RegisterData.php line 13

Open in your IDE?
  1. <?php
  2. /*
  3.  * Eventfix - RegisterModel.php
  4.  * --------------------------------------------------------------------------
  5.  * Created by: mhs
  6.  * Created on: 11.1.2024
  7.  * --------------------------------------------------------------------------
  8.  * Copyright (c) 2024 | Michael Hack Software e.K. | www.mh-s.de
  9.  */
  10. namespace App\Form\Data\System;
  11. class RegisterData {
  12.     public string $firstname '';
  13.     public string $lastname  '';
  14.     public string $mail      '';
  15.     public string $captcha '';
  16.     public string $v1      '';
  17.     public string $v2      '';
  18.     public bool $privacy false;
  19.     // ---------------------------------------------------------------------------------------------
  20.     public function isValid() : bool {
  21.         // Datenschutzerklärung
  22.         if (!$this->privacy) return false;
  23.         // Captcha
  24.         if ($this->captcha != (($this->v1 2) + ($this->v2 5))) return false;
  25.         return true;
  26.     }
  27. }