Subject Get the username or uid of the current session's user
Author semprolbat
I am writing a multiuser database that will keep track of several
records of several clients.
A user table and a user access table will keep track of users, and
which clients they are allowed to access. A client table contains
info on the clients, and a unique ID for each client, and the
datatables contain clientID and.. uhm.. data ;-)

Data will be added by stored procedures, and accessed via views.

How can the stored procedures/views obtain the uid or username of the
current session's user, so that the user will only be able to see the
data of the clients he has access to?

(select uid from rdb$current_session)