Added method for query-ing the store with the username. Used for matchin...

...g the username with some data modification query.
One has to configure the postgresql statement log:
postgres.conf

log_line_prefix = '%t %a %u %p '
log_statement = 'all'

and reload postgresql server configuration.