little style changes and adds name field to the public.tbl_cis_profil_update table

This commit is contained in:
SimonGschnell
2024-01-24 12:18:21 +01:00
parent 5f55834ccf
commit 20d6a34506
7 changed files with 39 additions and 22 deletions
+7 -2
View File
@@ -97,8 +97,13 @@ class Profil extends Auth_Controller
$payload = $json->payload;
$type = property_exists($json->payload,"kontakt_id")? "kontakt_id" : "adresse_id";
$data = ["topic"=>$json->topic,"uid" => $this->uid, "requested_change" => json_encode($payload), "change_timestamp" => "NOW()","status"=>"pending" ];
$name = $this->PersonModel->getFullName($this->uid);
if(isError($name)){
// error handling
var_dump($name);
return;
}
$data = ["topic"=>$json->topic,"uid" => $this->uid, "name"=>getData($name), "requested_change" => json_encode($payload), "change_timestamp" => "NOW()","status"=>"pending" ];
//? loops over all updateRequests from a user to validate if the new request is valid
$res = $this->ProfilChangeModel->loadWhere(["uid"=>$this->uid]);