Save $this->Auth->user('id') on DB

Hi.
How can I store the user id in my DB?
Thanks.

You’ll need to be much more explicit about what you’re trying to accomplish. Where in the database does it need to go, for example?

Hi.
I want to store the user_id in any controller at add and edit actions, so I created the field in every table.
In older versions I did this way:
$this->request->data[‘xxxxr’][‘created_by’] = $this->Auth->user(‘id’);
But i 4X is not possible this way.
Thanks.

GitHub - UseMuffin/Footprint: CakePHP plugin to allow passing currently logged in user to model layer. does exactly this.