Default Werte für die Entities
authorMarkus Broeker<broeker.markus@googlemail.com>
Sun, 14 Feb 2016 16:48:18 +0100
changeset 40 6c8c5f70b86f
parent 39 8b4f9c6136f4
child 41 08414729c5b4
Default Werte für die Entities
classes/bfw/entities/TGroup.php
classes/bfw/entities/TUser.php
--- a/classes/bfw/entities/TGroup.php
+++ b/classes/bfw/entities/TGroup.php
@@ -15,6 +15,12 @@
     const SYSTEM = 1;
     const ADMIN = 2;
 
+    public function __construct() {
+        parent::__construct();
+
+        $this->setName('');
+    }
+
     /**
      * @param $name
      * @return array|null
--- a/classes/bfw/entities/TUser.php
+++ b/classes/bfw/entities/TUser.php
@@ -14,6 +14,16 @@
 
     const SYSTEM = 1;
 
+    public function __construct() {
+        parent::__construct();
+
+        $this->setUsername('');
+        $this->setFirstname('');
+        $this->setLastname('');
+        $this->setPassword('');
+        $this->setGroupId(1);
+    }
+
     /**
      * <b>Liefert eine User-Instanz für den per Parameter übergebenen Nutzernamen.</b>
      *