Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -13,7 +13,17 @@ class ADBWohneinheit extends mfBaseModel {
|
||||
$this->db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
$this->table = "Wohneinheit";
|
||||
}
|
||||
|
||||
|
||||
protected function beforeUpdate($data) {
|
||||
if(!array_key_exists("edit_by", $data)) {
|
||||
$me = new User();
|
||||
$me->loadMe();
|
||||
$data["edit_by"] = $me->id;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function afterSave() {
|
||||
if(!$this->id) return true;
|
||||
if(!$this->hausnummer_id) return true;
|
||||
|
||||
Reference in New Issue
Block a user