public function getDbConnection()
{
if ($this->_connection === null) {
$userManager = $this->getManager();
if ($userManager instanceof TDbUserManager) {
$connection = $userManager->getDbConnection();
if ($connection instanceof TDbConnection) {
$connection->setActive(true);
$this->_connection = $connection;
}
}
if ($this->_connection === null) {
throw new TConfigurationException('dbuser_dbconnection_invalid');
}
}
return $this->_connection;
}