Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -7,8 +7,18 @@ class OpenAccessId extends mfBaseModel {
|
||||
private $adb_wohneinheit;
|
||||
private $adb_wohneinheit_count;
|
||||
private $termination;
|
||||
|
||||
public function loadRandomUnassigned($attributes = []) {
|
||||
|
||||
protected function beforeUpdate($data) {
|
||||
if(!array_key_exists("edit_by", $data)) {
|
||||
$me = new User();
|
||||
$me->loadMe();
|
||||
$data["edit_by"] = $me->id;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function loadRandomUnassigned($attributes = []) {
|
||||
$where = "active = 1 AND assigned = 0 AND adb_wohneinheit_id IS NULL AND termination_id IS NULL AND exported = 0 AND exported_to IS NULL";
|
||||
|
||||
if(array_key_exists("owner_id", $attributes) && $attributes['owner_id']) {
|
||||
|
||||
Reference in New Issue
Block a user