diff --git a/includes/Classes/Users.php b/includes/Classes/Users.php index fc258f33..e395698b 100644 --- a/includes/Classes/Users.php +++ b/includes/Classes/Users.php @@ -550,6 +550,14 @@ public function edit() $this->password_hashed = $this->hashPassword($this->password); + // Some fields should not be allowed to be written if the current user is not a client, + // as they are meant to be null for system users + if ($this->role != 0) { + $this->address = null; + $this->phone = null; + $this->contact = null; + } + if (strlen($this->password_hashed) >= 20) { $this->state['hash'] = 1;