Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -20,6 +20,16 @@ class ConstructionConsent extends mfBaseModel {
|
||||
private $footer_size = "8";
|
||||
|
||||
|
||||
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() {
|
||||
$this->createHistory();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user