database: remove unnecessary query
Created by: LawnGnome
As spotted by @eseliger, rather embarrassingly for me.
This means I didn't even need to plumb the logger through userCredentialsStore
in #38855, but I'm not going to revert that now. I assume this is the new best practice anyway.
Test plan
We have test coverage here. No tests were harmed changed in the making of this PR.