diff --git a/User.php b/User.php
index ea144b7..5fb7307 100644
--- a/User.php
+++ b/User.php
@@ -3,50 +3,126 @@
 
 class User
 {
-        public $username;
-        public $name;
-        public $first_name;
-        public $last_name;
-        public $email;
-        public $organization;
-        public $user_hash;
-        public $password;
-        function __construct()
-        {
-                $this->username = "";
-                $this->name = "";
-                $this->first_name = "";
-                $this->last_name = "";
-                $this->email = "";
-                $this->organization = "";
-                $this->user_hash = "";
-                $this->password = "";
+    public $username;
+    public $first_name;
+    public $last_name;
+    public $organization;
+    public $user_hash;
+    public $password;
+    public $street;
+    public $zip;
+    public $city;
+    public $country;
+    public $email;
+    public $phone;
+    public bool $eula_signed;
+    public bool $privacy_policy_signed;
+
+    function __construct()
+    {
+        $this->username = "";
+        $this->first_name = "";
+        $this->last_name = "";
+        $this->email = "";
+        $this->organization = "";
+        $this->user_hash = "";
+        $this->password = "";
+        $this->city = "";
+        $this->country = "";
+        $this->zip = "";
+        $this->street = "";
+        $this->phone = "";
+        $this->eula_signed = false;
+        $this->privacy_policy_signed = false;
+    }
+
+    function __construct1(object $data)
+    {
+        foreach ($data as $key => $value) {
+            if (array_key_exists($key, (array) $this))
+                $this->{$key} = $value;
         }
+        if (isset($data->password)) $this->set_password($data->password);
+    }
 
-        function __construct6(string $username, string $first_name, string $last_name, string $email, string $password, string $organization)
-        {
-                include 'config.php';
-                $this->username = $username;
-                $this->name = $first_name;
-                $this->first_name = $first_name;
-                $this->last_name = $last_name;
-                $this->email = $email;
-                $this->organization = $organization;
-                $this->set_password($password);
-
+    function init_from_object(object $data)
+    {
+        foreach ($data as $key => $value) {
+            if (array_key_exists($key, (array) $this))
+                $this->{$key} = $value;
         }
+        if (isset($data->password)) $this->set_password($data->password);
+    }
 
-        function set_password(string $password)
-        {
-                include 'config.php';
-                if ($ENCRYPT_PASSWORDS) {
-                        $this->user_hash = "{crypt}" . crypt($password, '$6$' . generateSalt(10) . '$');
-                        # $this->user_hash = "{SHA}" .  base64_encode(sha1($password, true));
-                } else {
-                        $this->user_hash = "{CLEAR}" . $password;
+    function init_from_array(array $data)
+    {
+        foreach ($data as $key => $value) {
+            if (array_key_exists($key, (array) $this)) {
+                if (is_bool(gettype($this->{$key})) && is_string($value))
+                    $this->{$key} = !empty($value);
+                else
+                    $this->{$key} = $value;
+            }
+        }
+        if (!empty($data["password"])) $this->set_password($data["password"]);
+    }
+
+    function __construct6(string $username, string $first_name, string $last_name, string $email, string $password, string $organization)
+    {
+        include 'config.php';
+        $this->username = $username;
+        $this->first_name = $first_name;
+        $this->last_name = $last_name;
+        $this->email = $email;
+        $this->organization = $organization;
+        $this->set_password($password);
+    }
+
+    function set_password(string $password)
+    {
+        include 'config.php';
+        if ($ENCRYPT_PASSWORDS) {
+            $this->user_hash = "{crypt}" . crypt($password, '$6$' . generateSalt(10) . '$');
+            # $this->user_hash = "{SHA}" .  base64_encode(sha1($password, true));
+        } else {
+            $this->user_hash = "{CLEAR}" . $password;
+        }
+        $this->password = $this->user_hash;
+    }
+
+    function to_string()
+    {
+        $tmp_user = $this;
+        $tmp_user->password = "***";
+        $tmp_user->user_hash = "***";
+        return  json_encode($tmp_user);
+    }
+
+    function backup_in_session()
+    {
+        global $_SESSION;
+        foreach ($this as $key => $value) {
+            $_SESSION[$key] = $value;
+        }
+    }
+
+    function to_table() {
+        $table = "<table  style='border: 1px solid #e1e4e8; border-collapse: collapse; width: 100%;'>";
+        foreach ($this as $key => $value) {
+            if ($key != "password" && $key != "user_hash" && !empty($value)) {
+                if (is_bool($value)) {
+                    if ($value) $value = "yes";
+                    else $value = "no";
                 }
-                $this->password = $this->user_hash;
+                $value = str_replace("\r\n", "<br>", $value);
+                $key = str_replace("_", " ", ucfirst($key));
+                $table .= " <tr>
+  <td style='border: 1px solid #e1e4e8; padding: 6px 13px;'><strong>$key</strong></td>
+  <td style='border: 1px solid #e1e4e8; padding: 6px 13px;'>$value</td>
+ </tr>\n";
+            }
         }
-}
-
-?>
\ No newline at end of file
+        $table .= "</table>";
+        return $table;
+    }
+}
\ No newline at end of file
