Undefined getUserId() function in MVCTable
I use atk 4.1.2. I found a problem while I tried to Insert/Update my Model. It seems like because I added two fields in my table, i.e. : created_by
and updated_by
.
I found these lines caused the problem in MVCTable.php:
if (isset($this开发者_运维知识库->fields['created_by']))
$this->dsql('modify',false)->set('created_by',$this->api->getUserId());
if (isset($this->fields['updated_by']))
$this->dsql('modify',false)->set('updated_by',$this->api->getUserId());
The method $this->api->getUserId()
is not defined anywhere. I don't know whether this same problem occurs for the previous atk versions.
Yes, it's a bit of legacy code which I haven't cleaned up yet. Please delete those lines manually and they will not be there in further versions.
https://github.com/atk4/atk4-addons/commit/e3b2379
精彩评论