I’m using cakePHP 3.8 and I can’t really find how to set database user that is saving data into database.
I thought that this
ConnectionManager::get('root');
would make it, but it doesn’t. How can I set the sending user to root?
Default one that I have has only permission to fetchData but not send it.
Btw yes root is set in config/app. I’m saving data using
$adsTable = TableRegistry::getTableLocator()->get('ads');
$ad = $adsTable->newEntity();
...
if($adsTable->save($ad))
echo "success";