I have these lines in my application.ini
how can I read user in my contrroler
resources.doctrine.dbal.connections.default.parameter
To get to the Doctrine container resource, just use :
$bootstrap = $this->getInvokeArg('bootstrap');
$doctrine = $bootstrap->getResource('doctrine');
From there you can drill down to the user name of the default connection (you can specify the connection if needed, just pass the name of the connection in the call to getConnection) :
$username = $doctrine->getConnection()->getUsername();