Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -28,8 +28,18 @@ class Building extends mfBaseModel {
|
||||
|
||||
return $address;
|
||||
}
|
||||
|
||||
protected function afterSave() {
|
||||
|
||||
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->in_after_save) return true;
|
||||
$this->in_after_save++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user