Change DSN user for DB login

Hello people,
I would be interested if someone else has such a problem.

I have a database that only needs a special user configuration for logging in. It must be user@hostname. The user himself in the database is only the part before the @. I would like to say that changing the username to user@hostname is not an option because the user in question is only the part before the @ in the database.

So far I have managed to do this by rewriting the DBI.pm, Handle.pm and rt-setup-database for the connection. Is there a possibility without having to touch the core software?
I tried to play around with the DatabaseExtraDSN but had no luck so far.

Regards, Manuel

Are you importing these users from some external sources?

That’s the way like Azure Postgresql as a service works.